Struct linera_chain::manager::ChainManager
source · pub struct ChainManager<C>{Show 16 fields
pub ownership: RegisterView<C, ChainOwnership>,
pub seed: RegisterView<C, u64>,
pub distribution: RegisterView<C, Option<WeightedAliasIndex<u64>>>,
pub fallback_distribution: RegisterView<C, Option<WeightedAliasIndex<u64>>>,
pub proposed: RegisterView<C, Option<BlockProposal>>,
pub proposed_blobs: MapView<C, BlobId, Blob>,
pub locking_block: RegisterView<C, Option<LockingBlock>>,
pub locking_blobs: MapView<C, BlobId, Blob>,
pub timeout: RegisterView<C, Option<TimeoutCertificate>>,
pub confirmed_vote: RegisterView<C, Option<Vote<ConfirmedBlock>>>,
pub validated_vote: RegisterView<C, Option<Vote<ValidatedBlock>>>,
pub timeout_vote: RegisterView<C, Option<Vote<Timeout>>>,
pub fallback_vote: RegisterView<C, Option<Vote<Timeout>>>,
pub round_timeout: RegisterView<C, Option<Timestamp>>,
pub current_round: RegisterView<C, Round>,
pub fallback_owners: RegisterView<C, BTreeMap<Owner, u64>>,
}
Expand description
The state of the certification process for a chain’s next block.
Fields§
§ownership: RegisterView<C, ChainOwnership>
The public keys, weights and types of the chain’s owners.
seed: RegisterView<C, u64>
The seed for the pseudo-random number generator that determines the round leaders.
distribution: RegisterView<C, Option<WeightedAliasIndex<u64>>>
The probability distribution for choosing a round leader.
fallback_distribution: RegisterView<C, Option<WeightedAliasIndex<u64>>>
The probability distribution for choosing a fallback round leader.
proposed: RegisterView<C, Option<BlockProposal>>
Highest-round authenticated block that we have received and checked. If there are multiple proposals in the same round, this contains only the first one.
proposed_blobs: MapView<C, BlobId, Blob>
These are blobs published or read by the proposed block.
locking_block: RegisterView<C, Option<LockingBlock>>
Latest validated proposal that a validator may have voted to confirm. This is either the
latest ValidatedBlock
we have seen, or the proposal from the Fast
round.
locking_blobs: MapView<C, BlobId, Blob>
These are blobs published or read by the locking block.
timeout: RegisterView<C, Option<TimeoutCertificate>>
Latest leader timeout certificate we have received.
confirmed_vote: RegisterView<C, Option<Vote<ConfirmedBlock>>>
Latest vote we cast to confirm a block.
validated_vote: RegisterView<C, Option<Vote<ValidatedBlock>>>
Latest vote we cast to validate a block.
timeout_vote: RegisterView<C, Option<Vote<Timeout>>>
Latest timeout vote we cast.
fallback_vote: RegisterView<C, Option<Vote<Timeout>>>
Fallback vote we cast.
round_timeout: RegisterView<C, Option<Timestamp>>
The time after which we are ready to sign a timeout certificate for the current round.
current_round: RegisterView<C, Round>
The lowest round where we can still vote to validate or confirm a block. This is the round to which the timeout applies.
Having a leader timeout certificate in any given round causes the next one to become current. Seeing a validated block certificate or a valid proposal in any round causes that round to become current, unless a higher one already is.
fallback_owners: RegisterView<C, BTreeMap<Owner, u64>>
The owners that take over in fallback mode.
Implementations§
source§impl<C> ChainManager<C>
impl<C> ChainManager<C>
pub async fn ownership( &self, ctx: &Context<'_>, ) -> Result<&RegisterView<C, ChainOwnership>>
pub async fn seed(&self, ctx: &Context<'_>) -> Result<&RegisterView<C, u64>>
pub async fn proposed_blobs( &self, ctx: &Context<'_>, ) -> Result<&MapView<C, BlobId, Blob>>
pub async fn locking_blobs( &self, ctx: &Context<'_>, ) -> Result<&MapView<C, BlobId, Blob>>
pub async fn round_timeout( &self, ctx: &Context<'_>, ) -> Result<&RegisterView<C, Option<Timestamp>>>
pub async fn fallback_owners( &self, ctx: &Context<'_>, ) -> Result<&RegisterView<C, BTreeMap<Owner, u64>>>
source§impl<C> ChainManager<C>
impl<C> ChainManager<C>
sourcepub fn reset<'a>(
&mut self,
ownership: ChainOwnership,
height: BlockHeight,
local_time: Timestamp,
fallback_owners: impl Iterator<Item = (AccountPublicKey, u64)> + 'a,
) -> Result<(), ChainError>
pub fn reset<'a>( &mut self, ownership: ChainOwnership, height: BlockHeight, local_time: Timestamp, fallback_owners: impl Iterator<Item = (AccountPublicKey, u64)> + 'a, ) -> Result<(), ChainError>
Replaces self
with a new chain manager.
sourcepub fn confirmed_vote(&self) -> Option<&Vote<ConfirmedBlock>>
pub fn confirmed_vote(&self) -> Option<&Vote<ConfirmedBlock>>
Returns the most recent confirmed vote we cast.
sourcepub fn validated_vote(&self) -> Option<&Vote<ValidatedBlock>>
pub fn validated_vote(&self) -> Option<&Vote<ValidatedBlock>>
Returns the most recent validated vote we cast.
sourcepub fn timeout_vote(&self) -> Option<&Vote<Timeout>>
pub fn timeout_vote(&self) -> Option<&Vote<Timeout>>
Returns the most recent timeout vote we cast.
sourcepub fn fallback_vote(&self) -> Option<&Vote<Timeout>>
pub fn fallback_vote(&self) -> Option<&Vote<Timeout>>
Returns the most recent fallback vote we cast.
sourcepub fn current_round(&self) -> Round
pub fn current_round(&self) -> Round
Returns the lowest round where we can still vote to validate or confirm a block. This is the round to which the timeout applies.
Having a leader timeout certificate in any given round causes the next one to become current. Seeing a validated block certificate or a valid proposal in any round causes that round to become current, unless a higher one already is.
sourcepub fn check_proposed_block(
&self,
proposal: &BlockProposal,
) -> Result<Outcome, ChainError>
pub fn check_proposed_block( &self, proposal: &BlockProposal, ) -> Result<Outcome, ChainError>
Verifies that a proposed block is relevant and should be handled.
sourcepub fn vote_timeout(
&mut self,
chain_id: ChainId,
height: BlockHeight,
epoch: Epoch,
key_pair: Option<&ValidatorSecretKey>,
local_time: Timestamp,
) -> bool
pub fn vote_timeout( &mut self, chain_id: ChainId, height: BlockHeight, epoch: Epoch, key_pair: Option<&ValidatorSecretKey>, local_time: Timestamp, ) -> bool
Checks if the current round has timed out, and signs a Timeout
.
sourcepub fn vote_fallback(
&mut self,
chain_id: ChainId,
height: BlockHeight,
epoch: Epoch,
key_pair: Option<&ValidatorSecretKey>,
) -> bool
pub fn vote_fallback( &mut self, chain_id: ChainId, height: BlockHeight, epoch: Epoch, key_pair: Option<&ValidatorSecretKey>, ) -> bool
Signs a Timeout
certificate to switch to fallback mode.
This must only be called after verifying that the condition for fallback mode is satisfied locally.
sourcepub fn check_validated_block(
&self,
certificate: &ValidatedBlockCertificate,
) -> Result<Outcome, ChainError>
pub fn check_validated_block( &self, certificate: &ValidatedBlockCertificate, ) -> Result<Outcome, ChainError>
Verifies that a validated block is still relevant and should be handled.
sourcepub fn create_vote(
&mut self,
proposal: BlockProposal,
executed_block: ExecutedBlock,
key_pair: Option<&ValidatorSecretKey>,
local_time: Timestamp,
blobs: BTreeMap<BlobId, Blob>,
) -> Result<Option<ValidatedOrConfirmedVote<'_>>, ChainError>
pub fn create_vote( &mut self, proposal: BlockProposal, executed_block: ExecutedBlock, key_pair: Option<&ValidatorSecretKey>, local_time: Timestamp, blobs: BTreeMap<BlobId, Blob>, ) -> Result<Option<ValidatedOrConfirmedVote<'_>>, ChainError>
Signs a vote to validate the proposed block.
sourcepub fn create_final_vote(
&mut self,
validated: ValidatedBlockCertificate,
key_pair: Option<&ValidatorSecretKey>,
local_time: Timestamp,
blobs: BTreeMap<BlobId, Blob>,
) -> Result<(), ViewError>
pub fn create_final_vote( &mut self, validated: ValidatedBlockCertificate, key_pair: Option<&ValidatorSecretKey>, local_time: Timestamp, blobs: BTreeMap<BlobId, Blob>, ) -> Result<(), ViewError>
Signs a vote to confirm the validated block.
sourcepub async fn pending_blob(
&self,
blob_id: &BlobId,
) -> Result<Option<Blob>, ViewError>
pub async fn pending_blob( &self, blob_id: &BlobId, ) -> Result<Option<Blob>, ViewError>
Returns the requested blob if it belongs to the proposal or the locking block.
sourcepub fn handle_timeout_certificate(
&mut self,
certificate: TimeoutCertificate,
local_time: Timestamp,
)
pub fn handle_timeout_certificate( &mut self, certificate: TimeoutCertificate, local_time: Timestamp, )
Updates the round number and timer if the timeout certificate is from a higher round than any known certificate.
sourcepub fn verify_owner(&self, proposal: &BlockProposal) -> bool
pub fn verify_owner(&self, proposal: &BlockProposal) -> bool
Returns whether the signer is a valid owner and allowed to propose a block in the proposal’s round.
Trait Implementations§
source§impl<C> ClonableView<C> for ChainManager<C>
impl<C> ClonableView<C> for ChainManager<C>
source§fn clone_unchecked(&mut self) -> Result<Self, ViewError>
fn clone_unchecked(&mut self) -> Result<Self, ViewError>
source§impl<C> ContainerType for ChainManager<C>
impl<C> ContainerType for ChainManager<C>
source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async_graphql::Value
. Read moresource§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
source§fn find_entity(
&self,
_: &ContextBase<'_, &Positioned<Field>>,
_params: &ConstValue,
) -> impl Future<Output = Result<Option<ConstValue>, ServerError>> + Send
fn find_entity( &self, _: &ContextBase<'_, &Positioned<Field>>, _params: &ConstValue, ) -> impl Future<Output = Result<Option<ConstValue>, ServerError>> + Send
source§impl<C> Debug for ChainManager<C>where
C: Clone + Context + Send + Sync + 'static,
RegisterView<C, ChainOwnership>: Debug,
RegisterView<C, u64>: Debug,
RegisterView<C, Option<WeightedAliasIndex<u64>>>: Debug,
RegisterView<C, Option<BlockProposal>>: Debug,
MapView<C, BlobId, Blob>: Debug,
RegisterView<C, Option<LockingBlock>>: Debug,
RegisterView<C, Option<TimeoutCertificate>>: Debug,
RegisterView<C, Option<Vote<ConfirmedBlock>>>: Debug,
RegisterView<C, Option<Vote<ValidatedBlock>>>: Debug,
RegisterView<C, Option<Vote<Timeout>>>: Debug,
RegisterView<C, Option<Timestamp>>: Debug,
RegisterView<C, Round>: Debug,
RegisterView<C, BTreeMap<Owner, u64>>: Debug,
impl<C> Debug for ChainManager<C>where
C: Clone + Context + Send + Sync + 'static,
RegisterView<C, ChainOwnership>: Debug,
RegisterView<C, u64>: Debug,
RegisterView<C, Option<WeightedAliasIndex<u64>>>: Debug,
RegisterView<C, Option<BlockProposal>>: Debug,
MapView<C, BlobId, Blob>: Debug,
RegisterView<C, Option<LockingBlock>>: Debug,
RegisterView<C, Option<TimeoutCertificate>>: Debug,
RegisterView<C, Option<Vote<ConfirmedBlock>>>: Debug,
RegisterView<C, Option<Vote<ValidatedBlock>>>: Debug,
RegisterView<C, Option<Vote<Timeout>>>: Debug,
RegisterView<C, Option<Timestamp>>: Debug,
RegisterView<C, Round>: Debug,
RegisterView<C, BTreeMap<Owner, u64>>: Debug,
source§impl<C> From<&ChainManager<C>> for ChainManagerInfo
impl<C> From<&ChainManager<C>> for ChainManagerInfo
source§fn from(manager: &ChainManager<C>) -> Self
fn from(manager: &ChainManager<C>) -> Self
source§impl<C> OutputType for ChainManager<C>
impl<C> OutputType for ChainManager<C>
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
async_graphql::Value
.source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
source§impl<C> View<C> for ChainManager<C>
impl<C> View<C> for ChainManager<C>
source§const NUM_INIT_KEYS: usize = 14usize
const NUM_INIT_KEYS: usize = 14usize
source§fn pre_load(context: &C) -> Result<Vec<Vec<u8>>, ViewError>
fn pre_load(context: &C) -> Result<Vec<Vec<u8>>, ViewError>
source§fn post_load(context: C, values: &[Option<Vec<u8>>]) -> Result<Self, ViewError>
fn post_load(context: C, values: &[Option<Vec<u8>>]) -> Result<Self, ViewError>
source§fn load<'async_trait>(
context: C,
) -> Pin<Box<dyn Future<Output = Result<Self, ViewError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn load<'async_trait>(
context: C,
) -> Pin<Box<dyn Future<Output = Result<Self, ViewError>> + Send + 'async_trait>>where
Self: 'async_trait,
source§fn rollback(&mut self)
fn rollback(&mut self)
flush
should have no effect to storage.source§fn has_pending_changes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_pending_changes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
true
if flushing this view would result in changes to the persistent storage.source§fn flush(&mut self, batch: &mut Batch) -> Result<bool, ViewError>
fn flush(&mut self, batch: &mut Batch) -> Result<bool, ViewError>
batch
variable first. If the view is dropped without calling flush
, staged
changes are simply lost.
The returned boolean indicates whether the operation removes the view or not.impl<C> ObjectType for ChainManager<C>
Auto Trait Implementations§
impl<C> Freeze for ChainManager<C>where
C: Freeze,
impl<C> RefUnwindSafe for ChainManager<C>where
C: RefUnwindSafe,
impl<C> Send for ChainManager<C>
impl<C> Sync for ChainManager<C>
impl<C> Unpin for ChainManager<C>where
C: Unpin,
impl<C> UnwindSafe for ChainManager<C>where
C: UnwindSafe,
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
source§impl<T> MockResults for T
impl<T> MockResults for T
§type Results = T
type Results = T
MockInstance
.source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§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 moresource§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 moresource§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
source§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
source§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.source§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.source§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.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.
source§impl<T> Tap for T
impl<T> Tap for T
source§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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.source§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.source§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.source§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.source§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.source§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.source§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.