pub(crate) struct Guard {Show 21 fields
id: GuardId,
orports: Vec<SocketAddr>,
pt_targets: Vec<PtTarget>,
added_at: SystemTime,
added_by: Option<CrateId>,
disabled: Option<Futureproof<GuardDisabled>>,
confirmed_at: Option<SystemTime>,
unlisted_since: Option<SystemTime>,
dir_info_missing: bool,
last_tried_to_connect_at: Option<Instant>,
retry_at: Option<Instant>,
retry_schedule: Option<RetryDelay>,
reachable: Reachable,
is_dir_cache: bool,
dir_status: DirStatus,
exploratory_circ_pending: bool,
circ_history: CircHistory,
suspicious_behavior_warned: bool,
clock_skew: Option<SkewObservation>,
sensitivity: DisplayRule,
unknown_fields: HashMap<String, JsonValue>,
}
Expand description
A single guard node, as held by the guard manager.
A Guard is a Tor relay that clients use for the first hop of their circuits.
It doesn’t need to be a relay that’s currently on the network (that is, one
that we could represent as a Relay
): guards might be
temporarily unlisted.
Some fields in guards are persistent; others are reset with every process.
§Identity
Every guard has at least one RelayId
. A guard may gain identities over
time, as we learn more about it, but it should never lose or change its
identities of a given type.
§TODO
This structure uses Instant
to represent non-persistent points in time,
and SystemTime
to represent points in time that need to be persistent.
That’s possibly undesirable; maybe we should come up with a better solution.
Fields§
§id: GuardId
The identity keys for this guard.
orports: Vec<SocketAddr>
The most recently seen addresses for this guard. If pt_targets
is
empty, these are the addresses we use for making OR connections to this
guard directly. If pt_targets
is nonempty, these are addresses at
which the server is “located” (q.v. HasAddrs
), but not ways to
connect to it.
pt_targets: Vec<PtTarget>
Any PtTarget
instances that we know about for connecting to this guard
over a pluggable transport.
If this is empty, then this guard only supports direct connections, at
the locations in orports
.
(Currently, this is always empty, or a singleton. If we find more than one, we only look at the first. It is a vector only for forward compatibility.)
added_at: SystemTime
When, approximately, did we first add this guard to our sample?
added_by: Option<CrateId>
What version of this crate added this guard to our sample?
disabled: Option<Futureproof<GuardDisabled>>
If present, this guard is permanently disabled, and this object tells us why.
confirmed_at: Option<SystemTime>
When, approximately, did we first successfully use this guard?
(We call a guard “confirmed” if we have successfully used it at least once.)
unlisted_since: Option<SystemTime>
If this guard is not listed in the current-consensus, this is the
valid_after
date of the oldest consensus in which it was not listed.
A guard counts as “unlisted” if it is absent, unusable, or doesn’t have the Guard flag.
dir_info_missing: bool
True if this guard is listed in the latest consensus, but we don’t have a microdescriptor for it.
last_tried_to_connect_at: Option<Instant>
When did we last give out this guard in response to a request?
retry_at: Option<Instant>
If this guard is currently Unreachable, when should we next retry it?
(Retrying a guard involves clearing this field, and setting
reachable
)
retry_schedule: Option<RetryDelay>
Schedule use to determine when we can next attempt to connect to this guard.
reachable: Reachable
Current reachability status for this guard.
is_dir_cache: bool
If true, then the last time we saw a relay entry for this guard, it seemed like a valid directory cache.
dir_status: DirStatus
Status for this guard, when used as a directory cache.
(This is separate from Reachable
and retry_schedule
, since being
usable for circuit construction does not necessarily mean that the guard
will have good, timely cache information. If it were not separate, then
circuit success would clear directory failures.)
exploratory_circ_pending: bool
If true, we have given this guard out for an exploratory circuit, and that exploratory circuit is still pending.
A circuit is “exploratory” if we launched it on a non-primary guard.
circ_history: CircHistory
A count of all the circuit statuses we’ve seen on this guard.
Used to implement a lightweight version of path-bias detection.
suspicious_behavior_warned: bool
True if we have warned about this guard behaving suspiciously.
clock_skew: Option<SkewObservation>
Latest clock skew (if any) we have observed from this guard.
sensitivity: DisplayRule
How should we display information about this guard?
unknown_fields: HashMap<String, JsonValue>
Fields from the state file that was used to make this Guard
that
this version of Arti doesn’t understand.
Implementations§
Source§impl Guard
impl Guard
Sourcepub(crate) fn from_candidate(
candidate: Candidate,
now: SystemTime,
params: &GuardParams,
) -> Self
pub(crate) fn from_candidate( candidate: Candidate, now: SystemTime, params: &GuardParams, ) -> Self
Sourcefn from_chan_target<T>(relay: &T, now: SystemTime, params: &GuardParams) -> Selfwhere
T: ChanTarget,
fn from_chan_target<T>(relay: &T, now: SystemTime, params: &GuardParams) -> Selfwhere
T: ChanTarget,
Create a new unused Guard
from a ChanTarget
.
This function doesn’t check whether the provided relay is a suitable guard node or not: that’s up to the caller to decide.
Sourcefn new(
id: GuardId,
orports: Vec<SocketAddr>,
pt_target: Option<PtTarget>,
added_at: SystemTime,
) -> Self
fn new( id: GuardId, orports: Vec<SocketAddr>, pt_target: Option<PtTarget>, added_at: SystemTime, ) -> Self
Return a new, manually constructed Guard
.
Sourcepub(crate) fn next_retry(&self, usage: &GuardUsage) -> Option<Instant>
pub(crate) fn next_retry(&self, usage: &GuardUsage) -> Option<Instant>
Return the next time at which this guard will be retriable for a given usage.
(Return None if we think this guard might be reachable right now.)
Sourcepub(crate) fn usable(&self) -> bool
pub(crate) fn usable(&self) -> bool
Return true if this guard is usable and working according to our latest configuration and directory information, and hasn’t been turned off for some other reason.
Sourcepub(crate) fn ready_for_usage(&self, usage: &GuardUsage, now: Instant) -> bool
pub(crate) fn ready_for_usage(&self, usage: &GuardUsage, now: Instant) -> bool
Return true if this guard is ready (with respect to any timeouts) for
the given usage
at now
.
Sourcepub(crate) fn copy_ephemeral_status_into_newly_loaded_state(
self,
other: Guard,
) -> Guard
pub(crate) fn copy_ephemeral_status_into_newly_loaded_state( self, other: Guard, ) -> Guard
Copy all non-persistent status from other
to self.
We do this when we were not the owner of our persistent state, and we
have just reloaded it (as self
), but we have some ephemeral knowledge
about this guard (as other
).
You should not invent new uses for this function; instead we should come up with alternatives.
§Panics
Panics if the identities in self
are not exactly the same as the
identities in other
.
Sourcefn set_reachable(&mut self, r: Reachable)
fn set_reachable(&mut self, r: Reachable)
Change the reachability status for this guard.
Sourcepub(crate) fn exploratory_circ_pending(&self) -> bool
pub(crate) fn exploratory_circ_pending(&self) -> bool
Return true if at least one exploratory circuit is pending to this guard.
A circuit is “exploratory” if launched on a non-primary guard.
§TODO
The “exploratory” definition doesn’t quite match up with the behavior in the spec, but it is what Tor does.
Sourcepub(crate) fn note_exploratory_circ(&mut self, pending: bool)
pub(crate) fn note_exploratory_circ(&mut self, pending: bool)
Note that an exploratory circuit is pending (if pending
is true),
or not pending (if pending
is false.
Sourcepub(crate) fn consider_retry(&mut self, now: Instant)
pub(crate) fn consider_retry(&mut self, now: Instant)
Possibly mark this guard as retriable, if it has been down for long enough.
Specifically, if the guard is to be Unreachable, and our last attempt
to connect to it is far enough in the past from now
, we change its
status to Unknown.
Sourcepub(crate) fn mark_retriable(&mut self)
pub(crate) fn mark_retriable(&mut self)
If this guard is marked Unreachable, clear its unreachability status and mark it as Retriable.
Sourcefn obeys_restrictions(&self, restrictions: &[GuardRestriction]) -> bool
fn obeys_restrictions(&self, restrictions: &[GuardRestriction]) -> bool
Return true if this guard obeys all of the given restrictions.
Sourcefn obeys_restriction(&self, r: &GuardRestriction) -> bool
fn obeys_restriction(&self, r: &GuardRestriction) -> bool
Return true if this guard obeys a single restriction.
Sourcepub(crate) fn conforms_to_usage(&self, usage: &GuardUsage) -> bool
pub(crate) fn conforms_to_usage(&self, usage: &GuardUsage) -> bool
Return true if this guard is suitable to use for the provided usage
.
Sourcepub(crate) fn listed_in<U: Universe>(&self, universe: &U) -> Option<bool>
pub(crate) fn listed_in<U: Universe>(&self, universe: &U) -> Option<bool>
Check whether this guard is listed in the provided sample::Universe
.
Returns Some(true)
if it is definitely listed, and Some(false)
if it
is definitely not listed. A None
return indicates that we need to
download more directory information about this guard before we can be
certain whether this guard is listed or not.
Sourcepub(crate) fn update_from_universe<U: Universe>(&mut self, universe: &U)
pub(crate) fn update_from_universe<U: Universe>(&mut self, universe: &U)
Change this guard’s status based on a newly received or newly updated
sample::Universe
.
A guard may become “listed” or “unlisted”: a listed guard is one that appears in the consensus with the Guard flag.
A guard may acquire additional identities if we learned them from the guard, either directly or via an authenticated directory document.
Additionally, a guard’s orports
or pt_targets
may change, if the
universe
lists a new address for the relay.
Sourcefn mark_listed(&mut self)
fn mark_listed(&mut self)
Mark this guard as currently listed in the directory.
Sourcefn mark_unlisted(&mut self, now: SystemTime)
fn mark_unlisted(&mut self, now: SystemTime)
Mark this guard as having been unlisted since now
, if it is not
already so marked.
Sourcepub(crate) fn is_expired(&self, params: &GuardParams, now: SystemTime) -> bool
pub(crate) fn is_expired(&self, params: &GuardParams, now: SystemTime) -> bool
Return true if we should remove this guard from the current guard sample.
Guards may be ready for removal because they have been confirmed too long ago, if they have been sampled too long ago (if they are not confirmed), or if they have been unlisted for too long.
Sourcepub(crate) fn record_failure(&mut self, now: Instant, is_primary: bool)
pub(crate) fn record_failure(&mut self, now: Instant, is_primary: bool)
Record that a failure has happened for this guard.
If is_primary
is true, this is a primary guard (q.v.).
Sourcepub(crate) fn record_attempt(&mut self, connect_attempt: Instant)
pub(crate) fn record_attempt(&mut self, connect_attempt: Instant)
Note that we have launch an attempted use of this guard.
We use this time to decide when to retry failing guards, and to see if the guard has been “pending” for a long time.
Sourcepub(crate) fn exploratory_attempt_after(&self, when: Instant) -> bool
pub(crate) fn exploratory_attempt_after(&self, when: Instant) -> bool
Return true if this guard has an exploratory circuit pending and
if the most recent attempt to connect to it is after when
.
Sourcepub(crate) fn record_success(
&mut self,
now: SystemTime,
params: &GuardParams,
) -> NewlyConfirmed
pub(crate) fn record_success( &mut self, now: SystemTime, params: &GuardParams, ) -> NewlyConfirmed
Note that a guard has been used successfully.
Updates that guard’s status to reachable, clears any failing status information for it, and decides whether the guard is newly confirmed.
If the guard is newly confirmed, the caller must add it to the list of confirmed guards.
Sourcepub(crate) fn record_external_success(&mut self, how: ExternalActivity)
pub(crate) fn record_external_success(&mut self, how: ExternalActivity)
Record that an external operation has succeeded on this guard.
Sourcepub(crate) fn record_external_failure(
&mut self,
how: ExternalActivity,
now: Instant,
)
pub(crate) fn record_external_failure( &mut self, how: ExternalActivity, now: Instant, )
Record that an external operation has failed on this guard.
Sourcepub(crate) fn record_indeterminate_result(&mut self)
pub(crate) fn record_indeterminate_result(&mut self)
Note that a circuit through this guard died in a way that we couldn’t necessarily attribute to the guard.
Sourcepub(crate) fn get_external_rep(&self, selection: GuardSetSelector) -> FirstHop
pub(crate) fn get_external_rep(&self, selection: GuardSetSelector) -> FirstHop
Return a FirstHop
object to represent this guard.
Sourcepub(crate) fn note_skew(&mut self, observation: SkewObservation)
pub(crate) fn note_skew(&mut self, observation: SkewObservation)
Record that a given fallback has told us about clock skew.
Sourcepub(crate) fn skew(&self) -> Option<&SkewObservation>
pub(crate) fn skew(&self) -> Option<&SkewObservation>
Return the most recent clock skew observation for this guard, if we have made one.
Trait Implementations§
Source§impl ChanTarget for Guard
impl ChanTarget for Guard
Source§fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>where
Self: Sized,
fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>where
Self: Sized,
ChanTarget
-specific members. Read moreSource§impl<'de> Deserialize<'de> for Guard
impl<'de> Deserialize<'de> for Guard
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>,
Source§impl HasAddrs for Guard
impl HasAddrs for Guard
Source§fn addrs(&self) -> &[SocketAddr]
fn addrs(&self) -> &[SocketAddr]
Source§impl HasChanMethod for Guard
impl HasChanMethod for Guard
Source§fn chan_method(&self) -> ChannelMethod
fn chan_method(&self) -> ChannelMethod
Source§impl HasRelayIds for Guard
impl HasRelayIds for Guard
Source§fn identity(&self, key_type: RelayIdType) -> Option<RelayIdRef<'_>>
fn identity(&self, key_type: RelayIdType) -> Option<RelayIdRef<'_>>
key_type
, or None if
the relay has no such identity. Read moreSource§fn identities(&self) -> RelayIdIter<'_, Self>
fn identities(&self) -> RelayIdIter<'_, Self>
Source§fn ed_identity(&self) -> Option<&Ed25519Identity>
fn ed_identity(&self) -> Option<&Ed25519Identity>
Source§fn rsa_identity(&self) -> Option<&RsaIdentity>
fn rsa_identity(&self) -> Option<&RsaIdentity>
Source§fn has_identity(&self, id: RelayIdRef<'_>) -> bool
fn has_identity(&self, id: RelayIdRef<'_>) -> bool
Source§fn has_any_identity(&self) -> bool
fn has_any_identity(&self) -> bool
Source§fn same_relay_ids<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
fn same_relay_ids<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
other
.Source§fn has_all_relay_ids_from<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
fn has_all_relay_ids_from<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
other
does. Read moreSource§fn has_any_relay_id_from<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
fn has_any_relay_id_from<T>(&self, other: &T) -> boolwhere
T: HasRelayIds + ?Sized,
other
has. Read moreSource§fn cmp_by_relay_ids<T>(&self, other: &T) -> Orderingwhere
T: HasRelayIds + ?Sized,
fn cmp_by_relay_ids<T>(&self, other: &T) -> Orderingwhere
T: HasRelayIds + ?Sized,
Source§fn display_relay_ids(&self) -> DisplayRelayIds<'_, Self>
fn display_relay_ids(&self) -> DisplayRelayIds<'_, Self>
HasRelayIds
members.Auto Trait Implementations§
impl Freeze for Guard
impl RefUnwindSafe for Guard
impl Send for Guard
impl Sync for Guard
impl Unpin for Guard
impl UnwindSafe for Guard
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> Conv for T
impl<T> Conv for T
§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>
, which can then be
downcast
into Box<dyn 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>
, which 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> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§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§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.