pub struct ClientContext<M> {
client: FinalClientIface,
module_instance_id: ModuleInstanceId,
global_dbtx_access_token: GlobalDBTxAccessToken,
module_db: Database,
_marker: PhantomData<M>,
}Expand description
A Client context for a ClientModule M
Client modules can interact with the whole client through this struct.
Fields§
§client: FinalClientIface§module_instance_id: ModuleInstanceId§global_dbtx_access_token: GlobalDBTxAccessToken§module_db: Database§_marker: PhantomData<M>Implementations§
Source§impl<M> ClientContext<M>where
M: ClientModule,
impl<M> ClientContext<M>where
M: ClientModule,
pub fn new( client: FinalClientIface, module_instance_id: ModuleInstanceId, global_dbtx_access_token: GlobalDBTxAccessToken, module_db: Database, ) -> Self
Sourcepub fn self_ref(&self) -> ClientContextSelfRef<'_, M>
pub fn self_ref(&self) -> ClientContextSelfRef<'_, M>
Get a reference back to client module from the Self
It’s often necessary for a client module to “move self”
by-value, especially due to async lifetimes issues.
Clients usually work with &mut self, which can’t really
work in such context.
Fortunately ClientContext is Clone and `Send, and
can be used to recover the reference to the module at later
time.
Sourcepub fn global_api(&self) -> DynGlobalApi
pub fn global_api(&self) -> DynGlobalApi
Get a reference to a global Api handle
Sourcepub fn module_api(&self) -> DynModuleApi
pub fn module_api(&self) -> DynModuleApi
Get a reference to a module Api handle
Sourcepub fn decoders(&self) -> ModuleDecoderRegistry
pub fn decoders(&self) -> ModuleDecoderRegistry
A set of all decoders of all modules of the client
pub fn input_from_dyn<'i>( &self, input: &'i DynInput, ) -> Option<&'i <M::Common as ModuleCommon>::Input>
pub fn output_from_dyn<'o>( &self, output: &'o DynOutput, ) -> Option<&'o <M::Common as ModuleCommon>::Output>
pub fn map_dyn<'s, 'i, 'o, I>(
&'s self,
typed: impl IntoIterator<Item = I> + 'i,
) -> impl Iterator<Item = <I as IntoDynInstance>::DynType> + 'owhere
I: IntoDynInstance,
'i: 'o,
's: 'o,
Sourcepub fn make_dyn_output(
&self,
output: <M::Common as ModuleCommon>::Output,
) -> DynOutput
pub fn make_dyn_output( &self, output: <M::Common as ModuleCommon>::Output, ) -> DynOutput
Turn a typed output into a dyn version
Sourcepub fn make_dyn_input(
&self,
input: <M::Common as ModuleCommon>::Input,
) -> DynInput
pub fn make_dyn_input( &self, input: <M::Common as ModuleCommon>::Input, ) -> DynInput
Turn a typed input into a dyn version
Sourcepub fn make_dyn<I>(&self, typed: I) -> <I as IntoDynInstance>::DynTypewhere
I: IntoDynInstance,
pub fn make_dyn<I>(&self, typed: I) -> <I as IntoDynInstance>::DynTypewhere
I: IntoDynInstance,
Turn a typed into a dyn version
Sourcepub fn make_client_outputs<O, S>(
&self,
output: ClientOutputBundle<O, S>,
) -> ClientOutputBundlewhere
O: IntoDynInstance<DynType = DynOutput> + 'static,
S: IntoDynInstance<DynType = DynState> + 'static,
pub fn make_client_outputs<O, S>(
&self,
output: ClientOutputBundle<O, S>,
) -> ClientOutputBundlewhere
O: IntoDynInstance<DynType = DynOutput> + 'static,
S: IntoDynInstance<DynType = DynState> + 'static,
Turn a typed ClientOutputBundle into a dyn version
Sourcepub fn make_client_inputs<I, S>(
&self,
inputs: ClientInputBundle<I, S>,
) -> ClientInputBundlewhere
I: IntoDynInstance<DynType = DynInput> + 'static,
S: IntoDynInstance<DynType = DynState> + 'static,
pub fn make_client_inputs<I, S>(
&self,
inputs: ClientInputBundle<I, S>,
) -> ClientInputBundlewhere
I: IntoDynInstance<DynType = DynInput> + 'static,
S: IntoDynInstance<DynType = DynState> + 'static,
Turn a typed ClientInputBundle into a dyn version
pub fn make_dyn_state<S>(&self, sm: S) -> DynStatewhere
S: IState + 'static,
pub async fn finalize_and_submit_transaction<F, Meta>( &self, operation_id: OperationId, operation_type: &str, operation_meta_gen: F, tx_builder: TransactionBuilder, ) -> Result<OutPointRange, TransactionSubmitError>
Sourcepub async fn finalize_and_submit_transaction_with_events<F, Meta>(
&self,
operation_id: OperationId,
operation_type: &str,
operation_meta_gen: F,
tx_builder: TransactionBuilder,
events: Vec<ClientModuleEvent>,
) -> Result<OutPointRange, TransactionSubmitError>
pub async fn finalize_and_submit_transaction_with_events<F, Meta>( &self, operation_id: OperationId, operation_type: &str, operation_meta_gen: F, tx_builder: TransactionBuilder, events: Vec<ClientModuleEvent>, ) -> Result<OutPointRange, TransactionSubmitError>
Submits a new operation and logs its announcing events in one commit.
Finalization errors roll back both the operation and the events. Commit conflicts retry the entire transaction, including event logging.
pub async fn finalize_and_submit_transaction_dbtx<F, Meta>( &self, dbtx: &mut DatabaseTransaction<'_>, operation_id: OperationId, operation_type: &str, operation_meta_gen: F, tx_builder: TransactionBuilder, ) -> Result<OutPointRange, TransactionSubmitError>
Sourcepub async fn fee_quote(
&self,
operation_id: OperationId,
request: FeeQuoteRequest,
) -> Result<FeeQuote, TransactionSubmitError>
pub async fn fee_quote( &self, operation_id: OperationId, request: FeeQuoteRequest, ) -> Result<FeeQuote, TransactionSubmitError>
Computes the fee that finalizing and submitting a transaction with the
explicit items described by request would incur, as a dry-run over the
client’s current funds, without submitting anything. See
Client::fee_quote.
Summarize the explicit inputs/outputs the operation would submit (their
gross amounts and federation fees) in request; the returned breakdown
adds the change the primary module’s balancing would produce.
Sourcepub async fn get_balance_for_btc(
&self,
account: Account,
) -> Result<Amount, ModuleLookupError>
pub async fn get_balance_for_btc( &self, account: Account, ) -> Result<Amount, ModuleLookupError>
The account’s Bitcoin balance, held by the primary module. See
Client::get_balance_for_btc.
Sourcepub fn supports_account(&self, unit: AmountUnit, account: Account) -> bool
pub fn supports_account(&self, unit: AmountUnit, account: Account) -> bool
Whether the primary module for unit can hold a balance for
account. A module handing out account-bound receive keys or addresses
checks this first, so that nothing is ever paid into an account the
primary module cannot fund a claim for.
pub async fn transaction_updates( &self, operation_id: OperationId, ) -> TransactionUpdates
pub async fn await_primary_module_outputs( &self, operation_id: OperationId, outputs: Vec<OutPoint>, ) -> Result<(), TransactionSubmitError>
pub async fn get_operation( &self, operation_id: OperationId, ) -> Result<OperationLogEntry, OperationLookupError>
pub fn module_db(&self) -> &Database
Sourcepub async fn get_event_log(
&self,
pos: Option<EventLogId>,
limit: u64,
) -> Vec<PersistedLogEntry>
pub async fn get_event_log( &self, pos: Option<EventLogId>, limit: u64, ) -> Vec<PersistedLogEntry>
Read a portion of the client’s event log, starting at pos (or the
beginning of the log if None) and returning up to limit entries.
pub async fn has_active_states(&self, op_id: OperationId) -> bool
Sourcepub async fn await_no_active_states(&self, op_id: OperationId)
pub async fn await_no_active_states(&self, op_id: OperationId)
Waits until no state machine of the operation is running any more: every transaction it submitted has been accepted or rejected, and every input and output state machine those started, the primary module’s among them, has reached its final state.
Unlike Self::await_primary_module_outputs this needs no outputs
named, and does not report whether they were issued. See
Client::await_no_active_states.
pub async fn operation_exists(&self, op_id: OperationId) -> bool
pub async fn get_own_active_states(&self) -> Vec<(M::States, ActiveStateMeta)>
Sourcepub async fn get_own_operation_active_states(
&self,
operation_id: OperationId,
) -> Vec<(M::States, ActiveStateMeta)>
pub async fn get_own_operation_active_states( &self, operation_id: OperationId, ) -> Vec<(M::States, ActiveStateMeta)>
Returns this module’s currently active state machines for the operation.
Sourcepub async fn get_own_operation_inactive_states(
&self,
operation_id: OperationId,
) -> Vec<(M::States, InactiveStateMeta)>
pub async fn get_own_operation_inactive_states( &self, operation_id: OperationId, ) -> Vec<(M::States, InactiveStateMeta)>
Returns this module’s previously active state machines for the operation.
pub async fn get_config(&self) -> ClientConfig
Sourcepub async fn get_invite_code(&self) -> InviteCode
pub async fn get_invite_code(&self) -> InviteCode
Returns an invite code for the federation that points to an arbitrary guardian server for fetching the config
pub fn get_internal_payment_markers(&self) -> Result<(PublicKey, u64), Error>
Sourcepub async fn manual_operation_start(
&self,
operation_id: OperationId,
account: Account,
op_type: &str,
operation_meta: impl Serialize + Debug,
sms: Vec<DynState>,
) -> Result<(), TransactionSubmitError>
pub async fn manual_operation_start( &self, operation_id: OperationId, account: Account, op_type: &str, operation_meta: impl Serialize + Debug, sms: Vec<DynState>, ) -> Result<(), TransactionSubmitError>
This method starts n state machines with given operation id without a corresponding transaction
pub async fn manual_operation_start_dbtx( &self, dbtx: &mut DatabaseTransaction<'_>, operation_id: OperationId, account: Account, op_type: &str, operation_meta: impl Serialize + Debug, sms: Vec<DynState>, ) -> Result<(), OperationAlreadyExistsError>
Sourceasync fn manual_operation_start_inner(
&self,
dbtx: &mut DatabaseTransaction<'_>,
operation_id: OperationId,
account: Account,
op_type: &str,
operation_meta: impl Serialize + Debug,
sms: Vec<DynState>,
) -> Result<(), OperationAlreadyExistsError>
async fn manual_operation_start_inner( &self, dbtx: &mut DatabaseTransaction<'_>, operation_id: OperationId, account: Account, op_type: &str, operation_meta: impl Serialize + Debug, sms: Vec<DynState>, ) -> Result<(), OperationAlreadyExistsError>
See Self::manual_operation_start, just inside a database
transaction.
Sourcepub fn outcome_or_updates<U, S>(
&self,
operation: &OperationLogEntry,
operation_id: OperationId,
is_terminal: impl Fn(&U) -> bool + MaybeSend + MaybeSync + 'static,
stream_gen: impl FnOnce() -> S + MaybeSend + 'static,
) -> UpdateStreamOrOutcome<U>
pub fn outcome_or_updates<U, S>( &self, operation: &OperationLogEntry, operation_id: OperationId, is_terminal: impl Fn(&U) -> bool + MaybeSend + MaybeSync + 'static, stream_gen: impl FnOnce() -> S + MaybeSend + 'static, ) -> UpdateStreamOrOutcome<U>
Resolve an operation to its cached outcome, or to a caching update
stream built by stream_gen.
is_terminal reports whether an update is a final state of the
operation; only terminal updates are cached as the durable outcome (a
stream that ends early on a non-terminal update caches nothing). The
same predicate also validates outcomes READ from the cache: a cached
outcome that fails to deserialize into U (e.g. one written by an
incompatible earlier version) or that is non-terminal (one frozen by a
previous version that cached whatever update a stream ended on) is
discarded with a warning and the state is rebuilt from the update
stream — whose terminal end then overwrites the stale cache — instead
of short-circuiting subscribers to it or panicking.
Sourcepub async fn claim_inputs<I, S>(
&self,
dbtx: &mut DatabaseTransaction<'_>,
inputs: ClientInputBundle<I, S>,
operation_id: OperationId,
) -> Result<OutPointRange, TransactionSubmitError>
pub async fn claim_inputs<I, S>( &self, dbtx: &mut DatabaseTransaction<'_>, inputs: ClientInputBundle<I, S>, operation_id: OperationId, ) -> Result<OutPointRange, TransactionSubmitError>
The claim is credited to the operation’s account, and any change the primary module adds comes back to the same one.
async fn claim_inputs_dyn( &self, dbtx: &mut DatabaseTransaction<'_>, inputs: InstancelessDynClientInputBundle, operation_id: OperationId, ) -> Result<OutPointRange, TransactionSubmitError>
Sourcepub async fn set_operation_account_dbtx(
&self,
dbtx: &mut DatabaseTransaction<'_>,
operation_id: OperationId,
account: Account,
)
pub async fn set_operation_account_dbtx( &self, dbtx: &mut DatabaseTransaction<'_>, operation_id: OperationId, account: Account, )
Records the account for an operation started without an operation log
entry, such as the state machines a recovery adds. See
Client::set_operation_account_dbtx.
pub async fn add_state_machines_dbtx( &self, dbtx: &mut DatabaseTransaction<'_>, states: Vec<DynState>, ) -> AddStateMachinesResult
Sourcepub async fn get_operation_dbtx(
&self,
dbtx: &mut DatabaseTransaction<'_>,
operation_id: OperationId,
) -> Option<OperationLogEntry>
pub async fn get_operation_dbtx( &self, dbtx: &mut DatabaseTransaction<'_>, operation_id: OperationId, ) -> Option<OperationLogEntry>
Reads an operation log entry within an ongoing database transaction.
Unlike Self::get_operation this observes writes made earlier in
dbtx, which is what a caller needs to decide atomically whether it is
about to create an operation that already exists.
pub async fn add_operation_log_entry_dbtx( &self, dbtx: &mut DatabaseTransaction<'_>, operation_id: OperationId, account: Account, operation_type: &str, operation_meta: impl Serialize, )
Sourcepub fn make_event<E: Event>(&self, event: E) -> ClientModuleEvent
pub fn make_event<E: Event>(&self, event: E) -> ClientModuleEvent
Prepares an event for
Self::finalize_and_submit_transaction_with_events.
pub async fn log_event<E, Cap>( &self, dbtx: &mut DatabaseTransaction<'_, Cap>, event: E, )
async fn log_serialized_event<Cap: Send>( &self, dbtx: &mut DatabaseTransaction<'_, Cap>, event: ClientModuleEvent, )
Trait Implementations§
Source§impl<M> Clone for ClientContext<M>
impl<M> Clone for ClientContext<M>
Auto Trait Implementations§
impl<M> Freeze for ClientContext<M>
impl<M> !RefUnwindSafe for ClientContext<M>
impl<M> Send for ClientContext<M>where
M: Send,
impl<M> Sync for ClientContext<M>where
M: Sync,
impl<M> Unpin for ClientContext<M>where
M: Unpin,
impl<M> !UnwindSafe for ClientContext<M>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§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> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PossiblyOption<T> for T
impl<T> PossiblyOption<T> 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
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.