pub struct HoprCodecConfig {
pub outgoing_ticket_price: Option<HoprBalance>,
pub min_incoming_ticket_price: Option<HoprBalance>,
pub outgoing_win_prob: Option<WinningProbability>,
pub replay_filter: ReplayFilterConfig,
}Expand description
Configuration of HoprEncoder and HoprDecoder.
Fields§
§outgoing_ticket_price: Option<HoprBalance>Optional price of outgoing tickets.
If not set (default), the network default will be used, which is the minimum allowed ticket price in the HOPR network.
min_incoming_ticket_price: Option<HoprBalance>Optional minimum price of incoming tickets.
The value cannot be lower than the default outgoing ticket price times the node’s path position.
If not set (default), the network default outgoing ticket price times the node’s path position will be used.
outgoing_win_prob: Option<WinningProbability>Optional probability of winning an outgoing ticket.
If not set (default), the network default will be used, which is the minimum allowed winning probability in the HOPR network.
replay_filter: ReplayFilterConfigConfiguration of the packet replay filter used by HoprDecoder.
The filter is global across previous hops: the replay token names the packet, not the sender, so a replay
injected through a different peer is still caught. See ReplayFilterConfig for
the retention floor and the memory consequences of the two knobs.
Trait Implementations§
Source§impl Clone for HoprCodecConfig
impl Clone for HoprCodecConfig
Source§fn clone(&self) -> HoprCodecConfig
fn clone(&self) -> HoprCodecConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HoprCodecConfig
Source§impl Debug for HoprCodecConfig
impl Debug for HoprCodecConfig
Source§impl Default for HoprCodecConfig
impl Default for HoprCodecConfig
Source§impl PartialEq for HoprCodecConfig
impl PartialEq 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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
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>
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