pub struct HoprCodecConfig {
pub outgoing_ticket_price: Option<HoprBalance>,
pub outgoing_win_prob: Option<WinningProbability>,
}Expand description
Configuration of HoprEncoder and HoprDecoder.
Fields§
§outgoing_ticket_price: Option<HoprBalance>Optional price of outgoing tickets.
If not set, the network default will be used, which is the minimum allowed ticket price in the HOPR network.
outgoing_win_prob: Option<WinningProbability>Optional probability of winning an outgoing ticket.
If not set, the network default will be used, which is the minimum allowed winning probability in the HOPR network.
The default is WinningProbability::ALWAYS.
Trait Implementations§
Source§impl Clone for HoprCodecConfig
impl Clone for HoprCodecConfig
Source§fn clone(&self) -> HoprCodecConfig
fn clone(&self) -> HoprCodecConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HoprCodecConfig
impl Debug for HoprCodecConfig
Source§impl Default for HoprCodecConfig
impl Default for HoprCodecConfig
Source§impl<'de> Deserialize<'de> for HoprCodecConfig
impl<'de> Deserialize<'de> for HoprCodecConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HoprCodecConfig
impl PartialEq for HoprCodecConfig
Source§impl Serialize for HoprCodecConfig
impl Serialize for HoprCodecConfig
Source§impl<'v_a> ValidateArgs<'v_a> for HoprCodecConfig
impl<'v_a> ValidateArgs<'v_a> for HoprCodecConfig
impl Copy for HoprCodecConfig
Auto Trait Implementations§
impl Freeze for HoprCodecConfig
impl RefUnwindSafe for HoprCodecConfig
impl Send for HoprCodecConfig
impl Sync for HoprCodecConfig
impl Unpin for HoprCodecConfig
impl UnwindSafe for HoprCodecConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more