pub struct Config {
pub client: Client,
pub debug: DebugConfig,
}Fields§
§client: Client§debug: DebugConfigImplementations§
Source§impl Config
impl Config
pub fn new<S1, S2>(id: S1, version: S2) -> Config
pub fn from_client_config(client: Client, debug: DebugConfig) -> Config
pub fn validate(&self) -> bool
pub fn with_debug_config(self, debug: DebugConfig) -> Config
pub fn with_disabled_credentials( self, disabled_credentials_mode: bool, ) -> Config
pub fn with_custom_nyxd(self, urls: Vec<Url>) -> Config
pub fn set_custom_nyxd(&mut self, nyxd_urls: Vec<Url>)
pub fn with_custom_nym_apis(self, nym_api_urls: Vec<Url>) -> Config
pub fn set_custom_nym_apis(&mut self, nym_api_urls: Vec<Url>)
pub fn with_high_default_traffic_volume(self, enabled: bool) -> Config
pub fn with_packet_type(self, packet_type: PacketType) -> Config
pub fn with_enabled_stats_reporting_address(self, address: Recipient) -> Config
pub fn with_forget_me(self, forget_me: ForgetMe) -> Config
pub fn set_high_default_traffic_volume(&mut self)
pub fn with_disabled_poisson_process(self, disabled: bool) -> Config
pub fn set_no_poisson_process(&mut self)
pub fn with_disabled_cover_traffic(self, disabled: bool) -> Config
pub fn set_no_cover_traffic(&mut self)
pub fn with_disabled_cover_traffic_with_keepalive( self, disabled: bool, ) -> Config
pub fn set_no_cover_traffic_with_keepalive(&mut self)
pub fn with_disabled_topology_refresh( self, disable_topology_refresh: bool, ) -> Config
pub fn with_no_per_hop_delays(self, no_per_hop_delays: bool) -> Config
pub fn set_no_per_hop_delays(&mut self)
pub fn with_secondary_packet_size( self, secondary_packet_size: Option<PacketSize>, ) -> Config
pub fn set_secondary_packet_size( &mut self, secondary_packet_size: Option<PacketSize>, )
pub fn set_custom_version(&mut self, version: &str)
pub fn get_id(&self) -> String
pub fn get_disabled_credentials_mode(&self) -> bool
pub fn get_validator_endpoints(&self) -> Vec<Url>
pub fn get_nym_api_endpoints(&self) -> Vec<Url>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Config
impl Serialize for Config
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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,
Source§impl<T> Deprecatable for T
impl<T> Deprecatable for T
fn deprecate(self) -> Deprecated<Self>where
Self: Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> OptionalSet for T
impl<T> OptionalSet for T
Source§fn with_optional<F, T>(self, f: F, val: Option<T>) -> Self
fn with_optional<F, T>(self, f: F, val: Option<T>) -> Self
If the value is available (i.e.
Some), the provided closure is applied.
Otherwise self is returned with no modifications.Source§fn with_validated_optional<F, T, V, E>(
self,
f: F,
value: Option<T>,
validate: V,
) -> Result<Self, E>
fn with_validated_optional<F, T, V, E>( self, f: F, value: Option<T>, validate: V, ) -> Result<Self, E>
If the value is available (i.e.
Some) it is validated and then the provided closure is applied.
Otherwise self is returned with no modifications.Source§fn with_optional_env<F, T>(self, f: F, val: Option<T>, env_var: &str) -> Self
fn with_optional_env<F, T>(self, f: F, val: Option<T>, env_var: &str) -> Self
If the value is available (i.e.
Some), the provided closure is applied.
Otherwise, if the environment was configured and the corresponding variable was set,
the value is parsed using the FromStr implementation and the closure is applied on that instead.
Finally, if none of those were available, self is returned with no modifications.Source§fn with_optional_custom_env<F, T, G>(
self,
f: F,
val: Option<T>,
env_var: &str,
parser: G,
) -> Self
fn with_optional_custom_env<F, T, G>( self, f: F, val: Option<T>, env_var: &str, parser: G, ) -> Self
If the value is available (i.e.
Some), the provided closure is applied.
Otherwise, if the environment was configured and the corresponding variable was set,
the value is parsed using the provided parser and the closure is applied on that instead.
Finally, if none of those were available, self is returned with no modifications.