#[non_exhaustive]pub struct NetParameters {Show 88 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_timeperiod_length: IntegerMinutes<BoundedInt32<30, 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 }>,
}
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
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 paramter 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_timeperiod_length: IntegerMinutes<BoundedInt32<30, 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.
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.
guard_hs_l2_number: BoundedInt32<1, { i32::MAX }>
The number of vanguards in the L2 vanguard set.
guard_hs_l2_lifetime_min: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>
The minimum lifetime of L2 vanguards.
guard_hs_l2_lifetime_max: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>
The maximum lifetime of L2 vanguards.
guard_hs_l3_number: BoundedInt32<1, { i32::MAX }>
The number of vanguards in the L3 vanguard set.
guard_hs_l3_lifetime_min: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>
The minimum lifetime of L3 vanguards.
guard_hs_l3_lifetime_max: IntegerSeconds<BoundedInt32<1, { i32::MAX }>>
The maximum lifetime of L3 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).
Implementations§
Trait Implementations§
Source§impl AsRef<NetParameters> for NetDir
impl AsRef<NetParameters> for NetDir
Source§fn as_ref(&self) -> &NetParameters
fn as_ref(&self) -> &NetParameters
Source§impl AsRef<NetParameters> for NetParameters
impl AsRef<NetParameters> for NetParameters
Source§fn as_ref(&self) -> &NetParameters
fn as_ref(&self) -> &NetParameters
Source§impl Clone for NetParameters
impl Clone for NetParameters
Source§fn clone(&self) -> NetParameters
fn clone(&self) -> NetParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NetParameters
impl Debug for NetParameters
Auto Trait Implementations§
impl Freeze for NetParameters
impl RefUnwindSafe for NetParameters
impl Send for NetParameters
impl Sync for NetParameters
impl Unpin for NetParameters
impl UnwindSafe for NetParameters
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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