NetParameters

Struct NetParameters 

Source
#[non_exhaustive]
pub struct NetParameters {
Show 92 fields pub bw_weight_scale: BoundedInt32<1, { i32::MAX }>, pub cbt_learning_disabled: BoundedInt32<0, 1>, pub cbt_num_xm_modes: BoundedInt32<1, 20>, pub cbt_success_count: BoundedInt32<3, 1_000>, pub cbt_max_timeouts: BoundedInt32<3, 10_000>, pub cbt_min_circs_for_estimate: BoundedInt32<1, 10_000>, pub cbt_timeout_quantile: Percentage<BoundedInt32<10, 99>>, pub cbt_abandon_quantile: Percentage<BoundedInt32<10, 99>>, pub cbt_min_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>, pub cbt_initial_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>, pub cbt_testing_delay: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub cbt_max_open_circuits_for_testing: BoundedInt32<0, 14>, pub cc_alg: BoundedInt32<0, 2>, pub cc_cwnd_full_gap: BoundedInt32<0, { _ }>, pub cc_cwnd_full_minpct: Percentage<BoundedInt32<0, 100>>, pub cc_cwnd_full_per_cwnd: BoundedInt32<0, 1>, pub cc_cwnd_init: BoundedInt32<31, 10_000>, pub cc_cwnd_inc_pct_ss: Percentage<BoundedInt32<1, 500>>, pub cc_cwnd_inc: BoundedInt32<1, 1000>, pub cc_cwnd_inc_rate: BoundedInt32<1, 250>, pub cc_cwnd_min: BoundedInt32<31, 1000>, pub cc_cwnd_max: BoundedInt32<500, { i32::MAX }>, pub cc_ewma_cwnd_pct: Percentage<BoundedInt32<1, 255>>, pub cc_ewma_max: BoundedInt32<2, { i32::MAX }>, pub cc_ewma_ss: BoundedInt32<2, { i32::MAX }>, pub cc_rtt_reset_pct: Percentage<BoundedInt32<0, 100>>, pub cc_sendme_inc: BoundedInt32<1, 254>, pub cc_ss_max: BoundedInt32<500, { i32::MAX }>, pub cc_vegas_alpha_exit: BoundedInt32<0, 1000>, pub cc_vegas_beta_exit: BoundedInt32<0, 1000>, pub cc_vegas_delta_exit: BoundedInt32<0, 1000>, pub cc_vegas_gamma_exit: BoundedInt32<0, 1000>, pub cc_vegas_alpha_onion: BoundedInt32<0, 1000>, pub cc_vegas_beta_onion: BoundedInt32<0, 1000>, pub cc_vegas_delta_onion: BoundedInt32<0, 1000>, pub cc_vegas_gamma_onion: BoundedInt32<0, 1000>, pub cc_vegas_sscap_exit: BoundedInt32<100, { i32::MAX }>, pub cc_vegas_sscap_onion: BoundedInt32<100, { i32::MAX }>, pub circuit_window: BoundedInt32<100, 1000>, pub circuit_priority_half_life: IntegerMilliseconds<BoundedInt32<1, { i32::MAX }>>, pub extend_by_ed25519_id: BoundedInt32<0, 1>, pub guard_meaningful_restriction: Percentage<BoundedInt32<1, 100>>, pub guard_extreme_restriction: Percentage<BoundedInt32<1, 100>>, pub guard_lifetime_unconfirmed: IntegerDays<BoundedInt32<1, 3650>>, pub guard_lifetime_confirmed: IntegerDays<BoundedInt32<1, 3650>>, pub guard_internet_likely_down: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub guard_max_sample_size: BoundedInt32<1, { i32::MAX }>, pub guard_max_sample_threshold: Percentage<BoundedInt32<1, 100>>, pub guard_filtered_min_sample_size: BoundedInt32<1, { i32::MAX }>, pub guard_n_primary: BoundedInt32<1, { i32::MAX }>, pub guard_use_parallelism: BoundedInt32<1, { i32::MAX }>, pub guard_dir_use_parallelism: BoundedInt32<1, { i32::MAX }>, pub guard_nonprimary_connect_timeout: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub guard_nonprimary_idle_timeout: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub guard_remove_unlisted_after: IntegerDays<BoundedInt32<1, 3650>>, pub min_circuit_path_threshold: Percentage<BoundedInt32<25, 95>>, pub nf_ito_low: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub nf_ito_high: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub nf_ito_low_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub nf_ito_high_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>, pub sendme_accept_min_version: SendMeVersion, pub sendme_emit_min_version: SendMeVersion, pub unused_client_circ_timeout: IntegerSeconds<BoundedInt32<60, 86_400>>, pub unused_client_circ_timeout_while_learning_cbt: IntegerSeconds<BoundedInt32<10, 60_000>>, pub hs_introcirc_requests_min: BoundedInt32<0, { i32::MAX }>, pub hs_introcirc_requests_max: BoundedInt32<0, { i32::MAX }>, pub hs_intro_min_lifetime: IntegerSeconds<BoundedInt32<0, { i32::MAX }>>, pub hs_intro_max_lifetime: IntegerSeconds<BoundedInt32<0, { i32::MAX }>>, pub hs_intro_num_extra_intropoints: BoundedInt32<0, 128>, pub hsdir_dl_max_reply_cells: BoundedInt32<2, 2304>, pub hsdir_ul_max_reply_cells: BoundedInt32<2, 1024>, pub hsdir_timeperiod_length: IntegerMinutes<BoundedInt32<5, 14400>>, pub hsdir_n_replicas: BoundedInt32<1, 16>, pub hsdir_spread_fetch: BoundedInt32<1, 128>, pub hsdir_spread_store: BoundedInt32<1, 128>, pub hsdir_max_desc_size: BoundedInt32<1, { i32::MAX }>, pub hs_service_rendezvous_failures_max: BoundedInt32<1, 10>, pub hs_intro_dos_enabled: BoundedInt32<0, 1>, pub hs_intro_dos_max_burst: BoundedInt32<0, { i32::MAX }>, pub hs_intro_dos_rate: BoundedInt32<0, { i32::MAX }>, pub vanguards_enabled: BoundedInt32<0, 2>, pub vanguards_hs_service: BoundedInt32<0, 2>, pub guard_hs_l2_number: BoundedInt32<1, { i32::MAX }>, pub guard_hs_l2_lifetime_min: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub guard_hs_l2_lifetime_max: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub guard_hs_l3_number: BoundedInt32<1, { i32::MAX }>, pub guard_hs_l3_lifetime_min: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub guard_hs_l3_lifetime_max: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>, pub kist_enabled: BoundedInt32<0, 1>, pub kist_tcp_notsent_lowat: BoundedInt32<1, { i32::MAX }>, pub use_family_lists: BoundedInt32<0, 1>, pub use_family_ids: BoundedInt32<0, 1>,
}
Expand description

This structure holds recognized configuration parameters. All values are type-safe, and where applicable clamped to be within range.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§bw_weight_scale: BoundedInt32<1, { i32::MAX }>

A weighting factor for bandwidth calculations

§cbt_learning_disabled: BoundedInt32<0, 1>

If true, do not attempt to learn circuit-build timeouts at all.

§cbt_num_xm_modes: BoundedInt32<1, 20>

Number of histograms bins to consider when estimating Xm for a Pareto-based circuit timeout estimator.

§cbt_success_count: BoundedInt32<3, 1_000>

How many recent circuit success/timeout statuses do we remember when trying to tell if our circuit timeouts are too low?

§cbt_max_timeouts: BoundedInt32<3, 10_000>

How many timeouts (in the last cbt_success_count observations) indicates that our circuit timeouts are too low?

§cbt_min_circs_for_estimate: BoundedInt32<1, 10_000>

Smallest number of circuit build times we have to view in order to use our Pareto-based circuit timeout estimator.

§cbt_timeout_quantile: Percentage<BoundedInt32<10, 99>>

Quantile to use when determining the correct circuit timeout value with our Pareto estimator.

(We continue building circuits after this timeout, but only for build-time measurement purposes.)

§cbt_abandon_quantile: Percentage<BoundedInt32<10, 99>>

Quantile to use when determining when to abandon circuits completely with our Pareto estimator.

§cbt_min_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>

Lowest permissible timeout value for Pareto timeout estimator.

§cbt_initial_timeout: IntegerMilliseconds<BoundedInt32<10, { i32::MAX }>>

Timeout value to use for our Pareto timeout estimator when we have no initial estimate.

§cbt_testing_delay: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

When we don’t have a good build-time estimate yet, how long (in seconds) do we wait between trying to launch build-time testing circuits through the network?

§cbt_max_open_circuits_for_testing: BoundedInt32<0, 14>

How many circuits can be open before we will no longer consider launching testing circuits to learn average build times?

§cc_alg: BoundedInt32<0, 2>

Specifies which congestion control algorithm clients should use. Current values are 0 for the fixed window algorithm and 2 for Vegas.

TODO: Flip this to 2 once CC circuit negotiation and Flow Control is in which would be the same default as C-tor. Reason is that we can’t have it to 2 for now else it makes the consensus download fails.

§cc_cwnd_full_gap: BoundedInt32<0, { _ }>

Vegas only. This parameter defines the integer number of ‘cc_sendme_inc’ multiples of gap allowed between inflight and cwnd, to still declare the cwnd full.

§cc_cwnd_full_minpct: Percentage<BoundedInt32<0, 100>>

Vegas only. This parameter defines a low watermark in percent.

§cc_cwnd_full_per_cwnd: BoundedInt32<0, 1>

Vegas only. This parameter governs how often a cwnd must be full.

§cc_cwnd_init: BoundedInt32<31, 10_000>

Initial congestion window for new congestion control Tor clients.

§cc_cwnd_inc_pct_ss: Percentage<BoundedInt32<1, 500>>

Percentage of the current congestion window to increment by during slow start, every congestion window.

§cc_cwnd_inc: BoundedInt32<1, 1000>

How much to increment the congestion window by during steady state, every congestion window.

§cc_cwnd_inc_rate: BoundedInt32<1, 250>

How often we update our congestion window, per cwnd worth of packets. (For example, if this is 2, we will update the window twice every window.)

§cc_cwnd_min: BoundedInt32<31, 1000>

The minimum allowed congestion window.

§cc_cwnd_max: BoundedInt32<500, { i32::MAX }>

The maximum allowed congestion window.

§cc_ewma_cwnd_pct: Percentage<BoundedInt32<1, 255>>

This specifies the N in N-EWMA smoothing of RTT and BDP estimation, as a percent of the number of SENDME acks in a congestion window.

A percentage over 100% indicates smoothing with more than one congestion window’s worth of SENDMEs.

§cc_ewma_max: BoundedInt32<2, { i32::MAX }>

This specifies the max N in N_EWMA smoothing of RTT and BDP estimation.

§cc_ewma_ss: BoundedInt32<2, { i32::MAX }>

This specifies the N in N_EWMA smoothing of RTT during Slow Start.

§cc_rtt_reset_pct: Percentage<BoundedInt32<0, 100>>

Describes a percentile average between RTT_min and RTT_current_ewma, for use to reset RTT_min, when the congestion window hits cwnd_min.

§cc_sendme_inc: BoundedInt32<1, 254>

Specifies how many cells a SENDME acks.

§cc_ss_max: BoundedInt32<500, { i32::MAX }>

This parameter provides a hard-max on the congestion window in Slow Start.

§cc_vegas_alpha_exit: BoundedInt32<0, 1000>

Vegas alpha parameter for an Exit circuit.

§cc_vegas_beta_exit: BoundedInt32<0, 1000>

Vegas beta parameter for an Exit circuit.

§cc_vegas_delta_exit: BoundedInt32<0, 1000>

Vegas delta parameter for an Exit circuit.

§cc_vegas_gamma_exit: BoundedInt32<0, 1000>

Vegas gamma parameter for an Exit circuit.

§cc_vegas_alpha_onion: BoundedInt32<0, 1000>

Vegas alpha parameter for an Onion circuit.

§cc_vegas_beta_onion: BoundedInt32<0, 1000>

Vegas beta parameter for an Onion circuit.

§cc_vegas_delta_onion: BoundedInt32<0, 1000>

Vegas delta parameter for an Onion circuit.

§cc_vegas_gamma_onion: BoundedInt32<0, 1000>

Vegas gamma parameter for an Onion circuit.

§cc_vegas_sscap_exit: BoundedInt32<100, { i32::MAX }>

Parameter for Exit circuit that describe the the RFC3742 ‘cap’, after which congestion window increments are reduced. The MAX disables RFC3742.

§cc_vegas_sscap_onion: BoundedInt32<100, { i32::MAX }>

Parameter for Onion circuit that describe the the RFC3742 ‘cap’, after which congestion window increments are reduced. The MAX disables RFC3742.

§circuit_window: BoundedInt32<100, 1000>

The maximum cell window size?

§circuit_priority_half_life: IntegerMilliseconds<BoundedInt32<1, { i32::MAX }>>

The decay parameter for circuit priority

§extend_by_ed25519_id: BoundedInt32<0, 1>

Whether to perform circuit extensions by Ed25519 ID

§guard_meaningful_restriction: Percentage<BoundedInt32<1, 100>>

If we have excluded so many possible guards that the available fraction is below this threshold, we should use a different guard sample.

§guard_extreme_restriction: Percentage<BoundedInt32<1, 100>>

We should warn the user if they have excluded so many guards that the available fraction is below this threshold.

§guard_lifetime_unconfirmed: IntegerDays<BoundedInt32<1, 3650>>

How long should we keep an unconfirmed guard (one we have not contacted) before removing it from the guard sample?

§guard_lifetime_confirmed: IntegerDays<BoundedInt32<1, 3650>>

How long should we keep a confirmed guard (one we have contacted) before removing it from the guard sample?

§guard_internet_likely_down: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

If all circuits have failed for this interval, then treat the internet as “probably down”, and treat any guard failures in that interval as unproven.

§guard_max_sample_size: BoundedInt32<1, { i32::MAX }>

Largest number of guards that a client should try to maintain in a sample of possible guards.

§guard_max_sample_threshold: Percentage<BoundedInt32<1, 100>>

Largest fraction of guard bandwidth on the network that a client should try to remain in a sample of possible guards.

§guard_filtered_min_sample_size: BoundedInt32<1, { i32::MAX }>

If the client ever has fewer than this many guards in their sample, after filtering out unusable guards, they should try to add more guards to the sample (if allowed).

§guard_n_primary: BoundedInt32<1, { i32::MAX }>

The number of confirmed guards that the client should treat as “primary guards”.

§guard_use_parallelism: BoundedInt32<1, { i32::MAX }>

The number of primary guards that the client should use in parallel. Other primary guards won’t get used unless earlier ones are down.

§guard_dir_use_parallelism: BoundedInt32<1, { i32::MAX }>

The number of primary guards that the client should use in parallel. Other primary directory guards won’t get used unless earlier ones are down.

§guard_nonprimary_connect_timeout: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

When trying to confirm nonprimary guards, if a guard doesn’t answer for more than this long in seconds, treat any lower- priority guards as possibly usable.

§guard_nonprimary_idle_timeout: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

When trying to confirm nonprimary guards, if a guard doesn’t answer for more than this long in seconds, treat it as down.

§guard_remove_unlisted_after: IntegerDays<BoundedInt32<1, 3650>>

If a guard has been unlisted in the consensus for at least this long, remove it from the consensus.

§min_circuit_path_threshold: Percentage<BoundedInt32<25, 95>>

The minimum threshold for circuit patch construction

§nf_ito_low: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, low end of random padding interval, milliseconds

nf_ito stands for “netflow inactive timeout”.

§nf_ito_high: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, high end of random padding interval, milliseconds

§nf_ito_low_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, low end of random padding interval (reduced padding) milliseconds

§nf_ito_high_reduced: IntegerMilliseconds<BoundedInt32<0, CHANNEL_PADDING_TIMEOUT_UPPER_BOUND>>

Channel padding, high end of random padding interval (reduced padding) , milliseconds

§sendme_accept_min_version: SendMeVersion

The minimum sendme version to accept.

§sendme_emit_min_version: SendMeVersion

The minimum sendme version to transmit.

§unused_client_circ_timeout: IntegerSeconds<BoundedInt32<60, 86_400>>

How long should never-used client circuits stay available, in the steady state?

§unused_client_circ_timeout_while_learning_cbt: IntegerSeconds<BoundedInt32<10, 60_000>>

When we’re learning circuit timeouts, how long should never-used client circuits stay available?

§hs_introcirc_requests_min: BoundedInt32<0, { i32::MAX }>

Lower bound on the number of INTRODUCE2 cells to allow per introduction circuit before the service decides to rotate to a new introduction circuit.

§hs_introcirc_requests_max: BoundedInt32<0, { i32::MAX }>

Upper bound on the number of INTRODUCE2 cells to allow per introduction circuit before the service decides to rotate to a new introduction circuit.

§hs_intro_min_lifetime: IntegerSeconds<BoundedInt32<0, { i32::MAX }>>

Lower bound on the lifetime of an introduction point.

§hs_intro_max_lifetime: IntegerSeconds<BoundedInt32<0, { i32::MAX }>>

Upper bound on the lifetime of an introduction point.

§hs_intro_num_extra_intropoints: BoundedInt32<0, 128>

Number of “extra” introduction points that an onion service is allowed to open based on demand.

§hsdir_dl_max_reply_cells: BoundedInt32<2, 2304>

Largest number of allowable relay cells received in reply to an hsdir download attempt.

§hsdir_ul_max_reply_cells: BoundedInt32<2, 1024>

Largest number of allowable relay cells received in reply to an hsdir upload attempt.

§hsdir_timeperiod_length: IntegerMinutes<BoundedInt32<5, 14400>>

The duration of a time period, as used in the onion service directory protocol.

During each “time period”, each onion service gets a different blinded ID, and the hash ring gets a new layout.

§hsdir_n_replicas: BoundedInt32<1, 16>

The number of positions at the hash ring where an onion service descriptor should be stored.

§hsdir_spread_fetch: BoundedInt32<1, 128>

The number of HSDir instances, at each position in the hash ring, that should be considered when downloading an onion service descriptor.

§hsdir_spread_store: BoundedInt32<1, 128>

The number of HSDir instances, at each position in the hash ring, that should be considered when uploading an onion service descriptor.

§hsdir_max_desc_size: BoundedInt32<1, { i32::MAX }>

Largest allowable v3 onion service size (in bytes).

§hs_service_rendezvous_failures_max: BoundedInt32<1, 10>

Largest number of failures to rendezvous that an onion service should allow for a request.

§hs_intro_dos_enabled: BoundedInt32<0, 1>

If set to 1, introduction points use the INTRODUCE1 rate limiting defense when no DosParams are sent.

See https://spec.torproject.org/param-spec.html#HiddenServiceEnableIntroDoSDefense

§hs_intro_dos_max_burst: BoundedInt32<0, { i32::MAX }>

Default rate value for an introduction point to use for INTRODUCE1 rate limiting when no DosParams value is sent, in messages per second.

See https://spec.torproject.org/param-spec.html#HiddenServiceEnableIntroDoSBurstPerSec

§hs_intro_dos_rate: BoundedInt32<0, { i32::MAX }>

Default burst value for an introduction point to use for INTRODUCE1 rate limiting when no DosParams value is sent.

See https://spec.torproject.org/param-spec.html#HiddenServiceEnableIntroDoSRatePerSec

§vanguards_enabled: BoundedInt32<0, 2>

The type of vanguards to use by default when building onion service circuits:

   0: No vanguards.
   1: Lite vanguards.
   2: Full vanguards.

See https://spec.torproject.org/param-spec.html#vanguards

§vanguards_hs_service: BoundedInt32<0, 2>

If higher than vanguards-enabled, and we are running an onion service, we use this level for all our onion service circuits:

   0: No vanguards.
   1: Lite vanguards.
   2: Full vanguards.

See https://spec.torproject.org/param-spec.html#vanguards

§guard_hs_l2_number: BoundedInt32<1, { i32::MAX }>

The number of vanguards in the L2 vanguard set.

See https://spec.torproject.org/param-spec.html#vanguards

§guard_hs_l2_lifetime_min: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

The minimum lifetime of L2 vanguards.

See https://spec.torproject.org/param-spec.html#vanguards

§guard_hs_l2_lifetime_max: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

The maximum lifetime of L2 vanguards.

See https://spec.torproject.org/param-spec.html#vanguards

§guard_hs_l3_number: BoundedInt32<1, { i32::MAX }>

The number of vanguards in the L3 vanguard set.

See https://spec.torproject.org/param-spec.html#vanguards

§guard_hs_l3_lifetime_min: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

The minimum lifetime of L3 vanguards.

See https://spec.torproject.org/param-spec.html#vanguards

§guard_hs_l3_lifetime_max: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>

The maximum lifetime of L3 vanguards.

See https://spec.torproject.org/param-spec.html#vanguards

§kist_enabled: BoundedInt32<0, 1>

The KIST to use by default when building inter-relay channels:

   0: No KIST.
   1: KIST using TCP_NOTSENT_LOWAT.
§kist_tcp_notsent_lowat: BoundedInt32<1, { i32::MAX }>

If kist_enabled is 1 (KIST using TCP_NOTSENT_LOWAT), the TCP_NOTSENT_LOWAT value to set for each channel.

If kist_enabled is 0 (disabled), the TCP_NOTSENT_LOWAT option is set to 0xFFFFFFFF (u32::MAX).

§use_family_lists: BoundedInt32<0, 1>

If true, we use lists of family members when making decisions about which relays belong to the same family.

§use_family_ids: BoundedInt32<0, 1>

If true, we use lists of family IDs when making decisions about which relays belong to the same family.

Implementations§

Source§

impl NetParameters

Source

pub fn from_map(p: &NetParams<i32>) -> Self

Construct a new NetParameters from a given list of key=value parameters.

Unrecognized parameters are ignored.

Trait Implementations§

Source§

impl AsRef<NetParameters> for NetDir

Source§

fn as_ref(&self) -> &NetParameters

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<NetParameters> for NetParameters

Source§

fn as_ref(&self) -> &NetParameters

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for NetParameters

Source§

fn clone(&self) -> NetParameters

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NetParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NetParameters

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a> From<&'a NetParameters> for FamilyRules

Source§

fn from(params: &'a NetParameters) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 364 bytes