pub struct P2pState {
pub chain_id: ChainId,
pub config: P2pConfig,
pub network: P2pNetworkState,
pub peers: BTreeMap<PeerId, P2pPeerState>,
pub last_random_disconnection_try: Timestamp,
pub callbacks: P2pCallbacks,
}
Fields§
§chain_id: ChainId
§config: P2pConfig
§network: P2pNetworkState
§peers: BTreeMap<PeerId, P2pPeerState>
§last_random_disconnection_try: Timestamp
§callbacks: P2pCallbacks
Implementations§
Source§impl P2pState
impl P2pState
Sourcepub fn channels_init<Action, State>(
&self,
dispatcher: &mut Dispatcher<Action, State>,
peer_id: PeerId,
)where
State: P2pStateTrait,
Action: P2pActionTrait<State>,
pub fn channels_init<Action, State>(
&self,
dispatcher: &mut Dispatcher<Action, State>,
peer_id: PeerId,
)where
State: P2pStateTrait,
Action: P2pActionTrait<State>,
Initializes enabled channels.
Source§impl P2pState
impl P2pState
pub fn incoming_accept( &self, peer_id: PeerId, offer: &Offer, ) -> Result<(), RejectionReason>
pub fn libp2p_incoming_accept( &self, peer_id: PeerId, ) -> Result<(), RejectionReason>
Source§impl P2pState
impl P2pState
pub fn identify_reducer<Action, State>(
state_context: Substate<'_, Action, State, P2pState>,
action: ActionWithMeta<P2pIdentifyAction>,
) -> Result<(), String>where
State: P2pStateTrait,
Action: P2pActionTrait<State>,
Source§impl P2pState
impl P2pState
pub fn new( config: P2pConfig, callbacks: P2pCallbacks, chain_id: &ChainId, ) -> P2pState
pub fn my_id(&self) -> PeerId
pub fn peer_connection_rpc_id( &self, peer_id: &PeerId, ) -> Option<RequestId<RpcIdType>>
Sourcepub fn get_ready_peer(&self, peer_id: &PeerId) -> Option<&P2pPeerStatusReady>
pub fn get_ready_peer(&self, peer_id: &PeerId) -> Option<&P2pPeerStatusReady>
Get peer in ready state. None
if peer isn’t in Ready
state,
or if peer doesn’t exist.
Sourcepub fn get_ready_peer_mut(
&mut self,
peer_id: &PeerId,
) -> Option<&mut P2pPeerStatusReady>
pub fn get_ready_peer_mut( &mut self, peer_id: &PeerId, ) -> Option<&mut P2pPeerStatusReady>
Get peer in ready state. None
if peer isn’t in Ready
state,
or if peer doesn’t exist.
pub fn any_ready_peers(&self) -> bool
pub fn disconnected_peers( &self, ) -> impl Iterator<Item = P2pConnectionOutgoingInitOpts>
pub fn ready_peers_iter( &self, ) -> impl Iterator<Item = (&PeerId, &P2pPeerStatusReady)>
pub fn ready_rpc_peers_iter( &self, ) -> impl Iterator<Item = (&PeerId, &P2pPeerStatusReady)>
pub fn ready_peers(&self) -> Vec<PeerId>
pub fn connected_or_connecting_peers_count(&self) -> usize
pub fn is_peer_connecting(&self, peer_id: &PeerId) -> bool
pub fn is_peer_connected_or_connecting(&self, peer_id: &PeerId) -> bool
pub fn is_libp2p_peer(&self, peer_id: &PeerId) -> bool
pub fn is_peer_rpc_timed_out( &self, peer_id: &PeerId, rpc_id: u64, now: Timestamp, ) -> bool
pub fn is_peer_streaming_rpc_timed_out( &self, peer_id: &PeerId, rpc_id: u64, now: Timestamp, ) -> bool
pub fn peer_rpc_timeouts(&self, now: Timestamp) -> Vec<(PeerId, u64, bool)>
pub fn peer_streaming_rpc_timeouts(&self, now: Timestamp) -> Vec<(PeerId, u64)>
pub fn already_has_min_peers(&self) -> bool
pub fn already_has_max_peers(&self) -> bool
Sourcepub fn already_has_max_ready_peers(&self) -> bool
pub fn already_has_max_ready_peers(&self) -> bool
The peers capacity is exceeded.
Sourcepub fn peer_with_connection(
&self,
conn_id: ConnectionAddr,
) -> Option<(PeerId, &P2pPeerState)>
pub fn peer_with_connection( &self, conn_id: ConnectionAddr, ) -> Option<(PeerId, &P2pPeerState)>
Peer with libp2p connection identified by conn_id
.
pub fn incoming_peer_connection_mut( &mut self, peer_id: &PeerId, ) -> Option<&mut P2pConnectionIncomingState>
pub fn outgoing_peer_connection_mut( &mut self, peer_id: &PeerId, ) -> Option<&mut P2pConnectionOutgoingState>
Source§impl P2pState
impl P2pState
pub fn reducer<State, Action>(
state_context: Substate<'_, Action, State, P2pState>,
action: ActionWithMeta<P2pAction>,
) -> Result<(), String>where
State: P2pStateTrait,
Action: P2pActionTrait<State>,
pub fn p2p_timeout_dispatch<State, Action>(
state_context: Substate<'_, Action, State, P2pState>,
meta: &ActionMeta,
) -> Result<(), String>where
State: P2pStateTrait,
Action: P2pActionTrait<State>,
Trait Implementations§
Source§impl<'de> Deserialize<'de> for P2pState
impl<'de> Deserialize<'de> for P2pState
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<P2pState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<P2pState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EnablingCondition<P2pState> for P2pChannelsAction
impl EnablingCondition<P2pState> for P2pChannelsAction
Source§impl EnablingCondition<P2pState> for P2pChannelsBestTipAction
impl EnablingCondition<P2pState> for P2pChannelsBestTipAction
Source§impl EnablingCondition<P2pState> for P2pChannelsEffectfulAction
impl EnablingCondition<P2pState> for P2pChannelsEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pChannelsMessageReceivedAction
impl EnablingCondition<P2pState> for P2pChannelsMessageReceivedAction
Source§impl EnablingCondition<P2pState> for P2pChannelsRpcAction
impl EnablingCondition<P2pState> for P2pChannelsRpcAction
Source§impl EnablingCondition<P2pState> for P2pChannelsSignalingDiscoveryAction
impl EnablingCondition<P2pState> for P2pChannelsSignalingDiscoveryAction
Source§impl EnablingCondition<P2pState> for P2pChannelsSignalingExchangeAction
impl EnablingCondition<P2pState> for P2pChannelsSignalingExchangeAction
Source§impl EnablingCondition<P2pState> for P2pChannelsSnarkAction
impl EnablingCondition<P2pState> for P2pChannelsSnarkAction
Source§impl EnablingCondition<P2pState> for P2pChannelsSnarkJobCommitmentAction
impl EnablingCondition<P2pState> for P2pChannelsSnarkJobCommitmentAction
Source§impl EnablingCondition<P2pState> for P2pChannelsStreamingRpcAction
impl EnablingCondition<P2pState> for P2pChannelsStreamingRpcAction
Source§impl EnablingCondition<P2pState> for P2pChannelsTransactionAction
impl EnablingCondition<P2pState> for P2pChannelsTransactionAction
Source§impl EnablingCondition<P2pState> for P2pConnectionAction
impl EnablingCondition<P2pState> for P2pConnectionAction
Source§impl EnablingCondition<P2pState> for P2pConnectionEffectfulAction
impl EnablingCondition<P2pState> for P2pConnectionEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pConnectionIncomingAction
impl EnablingCondition<P2pState> for P2pConnectionIncomingAction
Source§impl EnablingCondition<P2pState> for P2pConnectionIncomingEffectfulAction
impl EnablingCondition<P2pState> for P2pConnectionIncomingEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pConnectionOutgoingAction
impl EnablingCondition<P2pState> for P2pConnectionOutgoingAction
Source§impl EnablingCondition<P2pState> for P2pConnectionOutgoingEffectfulAction
impl EnablingCondition<P2pState> for P2pConnectionOutgoingEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pDisconnectionAction
impl EnablingCondition<P2pState> for P2pDisconnectionAction
Source§impl EnablingCondition<P2pState> for P2pDisconnectionEffectfulAction
impl EnablingCondition<P2pState> for P2pDisconnectionEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pEffectfulAction
impl EnablingCondition<P2pState> for P2pEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pIdentifyAction
impl EnablingCondition<P2pState> for P2pIdentifyAction
Source§impl EnablingCondition<P2pState> for P2pInitializeAction
impl EnablingCondition<P2pState> for P2pInitializeAction
Source§impl EnablingCondition<P2pState> for P2pNetworkAction
impl EnablingCondition<P2pState> for P2pNetworkAction
Source§impl EnablingCondition<P2pState> for P2pNetworkEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkIdentifyAction
impl EnablingCondition<P2pState> for P2pNetworkIdentifyAction
Source§impl EnablingCondition<P2pState> for P2pNetworkIdentifyEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkIdentifyEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkIdentifyStreamAction
impl EnablingCondition<P2pState> for P2pNetworkIdentifyStreamAction
Source§impl EnablingCondition<P2pState> for P2pNetworkIdentifyStreamEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkIdentifyStreamEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkKadAction
impl EnablingCondition<P2pState> for P2pNetworkKadAction
Source§impl EnablingCondition<P2pState> for P2pNetworkKadBootstrapAction
impl EnablingCondition<P2pState> for P2pNetworkKadBootstrapAction
Source§impl EnablingCondition<P2pState> for P2pNetworkKadEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkKadEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkKadRequestAction
impl EnablingCondition<P2pState> for P2pNetworkKadRequestAction
Source§impl EnablingCondition<P2pState> for P2pNetworkKademliaAction
impl EnablingCondition<P2pState> for P2pNetworkKademliaAction
Source§impl EnablingCondition<P2pState> for P2pNetworkKademliaStreamAction
impl EnablingCondition<P2pState> for P2pNetworkKademliaStreamAction
Source§impl EnablingCondition<P2pState> for P2pNetworkNoiseAction
impl EnablingCondition<P2pState> for P2pNetworkNoiseAction
Source§impl EnablingCondition<P2pState> for P2pNetworkPnetAction
impl EnablingCondition<P2pState> for P2pNetworkPnetAction
Source§impl EnablingCondition<P2pState> for P2pNetworkPnetEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkPnetEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkPubsubAction
impl EnablingCondition<P2pState> for P2pNetworkPubsubAction
Source§impl EnablingCondition<P2pState> for P2pNetworkPubsubEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkPubsubEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkRpcAction
impl EnablingCondition<P2pState> for P2pNetworkRpcAction
Source§impl EnablingCondition<P2pState> for P2pNetworkSchedulerAction
impl EnablingCondition<P2pState> for P2pNetworkSchedulerAction
Source§impl EnablingCondition<P2pState> for P2pNetworkSchedulerEffectfulAction
impl EnablingCondition<P2pState> for P2pNetworkSchedulerEffectfulAction
Source§impl EnablingCondition<P2pState> for P2pNetworkSelectAction
impl EnablingCondition<P2pState> for P2pNetworkSelectAction
Source§impl EnablingCondition<P2pState> for P2pNetworkYamuxAction
impl EnablingCondition<P2pState> for P2pNetworkYamuxAction
Source§impl EnablingCondition<P2pState> for P2pPeerAction
impl EnablingCondition<P2pState> for P2pPeerAction
Source§impl Serialize for P2pState
impl Serialize for P2pState
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
Source§impl<S> SubStore<State, P2pState> for Store<S>where
S: Service,
impl<S> SubStore<State, P2pState> for Store<S>where
S: Service,
type SubAction = P2pAction
type Service = S
fn state(&self) -> &P2pState
fn service(&mut self) -> &mut Self::Service
fn state_and_service(&mut self) -> (&P2pState, &mut Self::Service)
fn dispatch<A>(&mut self, action: A) -> bool
fn dispatch_callback<T>(&mut self, callback: Callback<T>, args: T) -> bool
Source§impl SubstateAccess<P2pConfig> for P2pState
impl SubstateAccess<P2pConfig> for P2pState
Source§impl SubstateAccess<P2pLimits> for P2pState
impl SubstateAccess<P2pLimits> for P2pState
Source§impl SubstateAccess<P2pNetworkIdentifyState> for P2pState
impl SubstateAccess<P2pNetworkIdentifyState> for P2pState
Source§fn substate(&self) -> Result<&P2pNetworkIdentifyState, String>
fn substate(&self) -> Result<&P2pNetworkIdentifyState, String>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> Result<&mut P2pNetworkIdentifyState, String>
fn substate_mut(&mut self) -> Result<&mut P2pNetworkIdentifyState, String>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkKadBootstrapState> for P2pState
impl SubstateAccess<P2pNetworkKadBootstrapState> for P2pState
Source§fn substate(&self) -> Result<&P2pNetworkKadBootstrapState, String>
fn substate(&self) -> Result<&P2pNetworkKadBootstrapState, String>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> Result<&mut P2pNetworkKadBootstrapState, String>
fn substate_mut(&mut self) -> Result<&mut P2pNetworkKadBootstrapState, String>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkKadState> for P2pState
impl SubstateAccess<P2pNetworkKadState> for P2pState
Source§fn substate(&self) -> Result<&P2pNetworkKadState, String>
fn substate(&self) -> Result<&P2pNetworkKadState, String>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> Result<&mut P2pNetworkKadState, String>
fn substate_mut(&mut self) -> Result<&mut P2pNetworkKadState, String>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkPubsubState> for P2pState
impl SubstateAccess<P2pNetworkPubsubState> for P2pState
Source§fn substate(&self) -> Result<&P2pNetworkPubsubState, String>
fn substate(&self) -> Result<&P2pNetworkPubsubState, String>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> Result<&mut P2pNetworkPubsubState, String>
fn substate_mut(&mut self) -> Result<&mut P2pNetworkPubsubState, String>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkSchedulerState> for P2pState
impl SubstateAccess<P2pNetworkSchedulerState> for P2pState
Source§fn substate(&self) -> Result<&P2pNetworkSchedulerState, String>
fn substate(&self) -> Result<&P2pNetworkSchedulerState, String>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> Result<&mut P2pNetworkSchedulerState, String>
fn substate_mut(&mut self) -> Result<&mut P2pNetworkSchedulerState, String>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pNetworkState> for P2pState
impl SubstateAccess<P2pNetworkState> for P2pState
Source§fn substate(&self) -> Result<&P2pNetworkState, String>
fn substate(&self) -> Result<&P2pNetworkState, String>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> Result<&mut P2pNetworkState, String>
fn substate_mut(&mut self) -> Result<&mut P2pNetworkState, String>
Attempts to obtain a mutable reference to the substate. Read more
Source§impl SubstateAccess<P2pState> for P2pState
impl SubstateAccess<P2pState> for P2pState
Source§impl SubstateAccess<P2pState> for State
impl SubstateAccess<P2pState> for State
Source§fn substate(&self) -> SubstateResult<&P2pState>
fn substate(&self) -> SubstateResult<&P2pState>
Attempts to obtain an immutable reference to the substate. Read more
Source§fn substate_mut(&mut self) -> SubstateResult<&mut P2pState>
fn substate_mut(&mut self) -> SubstateResult<&mut P2pState>
Attempts to obtain a mutable reference to the substate. Read more
Auto Trait Implementations§
impl Freeze for P2pState
impl RefUnwindSafe for P2pState
impl Send for P2pState
impl Sync for P2pState
impl Unpin for P2pState
impl UnwindSafe for P2pState
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> 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,
§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
Mutably borrows from an owned value. Read more
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> 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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Formats each item in a sequence. Read more
§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>
§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,
Pipes by value. This is generally the method you want to use. Read more
§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,
Borrows
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,
Mutably borrows
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
Borrows
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
Mutably borrows
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
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.