Struct Context
pub struct Context<BLOCK = BlockEnv, TX = TxEnv, CFG = CfgEnv, DB = EmptyDBTyped<Infallible>, JOURNAL = Journal<DB>, CHAIN = ()>{
pub block: BLOCK,
pub tx: TX,
pub cfg: CFG,
pub journaled_state: JOURNAL,
pub chain: CHAIN,
pub error: Result<(), ContextError<<DB as Database>::Error>>,
}
Expand description
EVM context contains data that EVM needs for execution.
Fields§
§block: BLOCK
Block information.
tx: TX
Transaction information.
cfg: CFG
Configurations.
journaled_state: JOURNAL
EVM State with journaling support and database.
chain: CHAIN
Inner context.
error: Result<(), ContextError<<DB as Database>::Error>>
Error that happened during execution.
Implementations§
§impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
pub fn with_new_journal<OJOURNAL>(
self,
journal: OJOURNAL,
) -> Context<BLOCK, TX, CFG, DB, OJOURNAL, CHAIN>where
OJOURNAL: JournalTr<Database = DB>,
pub fn with_db<ODB>(
self,
db: ODB,
) -> Context<BLOCK, TX, CFG, ODB, Journal<ODB>, CHAIN>where
ODB: Database,
pub fn with_db<ODB>(
self,
db: ODB,
) -> Context<BLOCK, TX, CFG, ODB, Journal<ODB>, CHAIN>where
ODB: Database,
Creates a new context with a new database type.
pub fn with_ref_db<ODB>(
self,
db: ODB,
) -> Context<BLOCK, TX, CFG, WrapDatabaseRef<ODB>, Journal<WrapDatabaseRef<ODB>>, CHAIN>where
ODB: DatabaseRef,
pub fn with_ref_db<ODB>(
self,
db: ODB,
) -> Context<BLOCK, TX, CFG, WrapDatabaseRef<ODB>, Journal<WrapDatabaseRef<ODB>>, CHAIN>where
ODB: DatabaseRef,
Creates a new context with a new DatabaseRef
type.
pub fn with_block<OB>(
self,
block: OB,
) -> Context<OB, TX, CFG, DB, JOURNAL, CHAIN>where
OB: Block,
pub fn with_block<OB>(
self,
block: OB,
) -> Context<OB, TX, CFG, DB, JOURNAL, CHAIN>where
OB: Block,
Creates a new context with a new block type.
pub fn with_tx<OTX>(
self,
tx: OTX,
) -> Context<BLOCK, OTX, CFG, DB, JOURNAL, CHAIN>where
OTX: Transaction,
pub fn with_tx<OTX>(
self,
tx: OTX,
) -> Context<BLOCK, OTX, CFG, DB, JOURNAL, CHAIN>where
OTX: Transaction,
Creates a new context with a new transaction type.
pub fn with_chain<OC>(
self,
chain: OC,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, OC>
pub fn with_chain<OC>( self, chain: OC, ) -> Context<BLOCK, TX, CFG, DB, JOURNAL, OC>
Creates a new context with a new chain type.
pub fn with_cfg<OCFG>(
self,
cfg: OCFG,
) -> Context<BLOCK, TX, OCFG, DB, JOURNAL, CHAIN>where
OCFG: Cfg,
pub fn with_cfg<OCFG>(
self,
cfg: OCFG,
) -> Context<BLOCK, TX, OCFG, DB, JOURNAL, CHAIN>where
OCFG: Cfg,
Creates a new context with a new chain type.
pub fn modify_cfg_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
pub fn modify_cfg_chained<F>( self, f: F, ) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
Modifies the context configuration.
pub fn modify_block_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
F: FnOnce(&mut BLOCK),
pub fn modify_block_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
F: FnOnce(&mut BLOCK),
Modifies the context block.
pub fn modify_tx_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
pub fn modify_tx_chained<F>( self, f: F, ) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
Modifies the context transaction.
pub fn modify_chain_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
F: FnOnce(&mut CHAIN),
pub fn modify_chain_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
F: FnOnce(&mut CHAIN),
Modifies the context chain.
pub fn modify_db_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
pub fn modify_db_chained<F>( self, f: F, ) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
Modifies the context database.
pub fn modify_journal_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
F: FnOnce(&mut JOURNAL),
pub fn modify_journal_chained<F>(
self,
f: F,
) -> Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
F: FnOnce(&mut JOURNAL),
Modifies the context journal.
pub fn modify_block<F>(&mut self, f: F)where
F: FnOnce(&mut BLOCK),
pub fn modify_block<F>(&mut self, f: F)where
F: FnOnce(&mut BLOCK),
Modifies the context block.
pub fn modify_tx<F>(&mut self, f: F)
pub fn modify_cfg<F>(&mut self, f: F)
pub fn modify_chain<F>(&mut self, f: F)where
F: FnOnce(&mut CHAIN),
pub fn modify_db<F>(&mut self, f: F)
pub fn modify_journal<F>(&mut self, f: F)where
F: FnOnce(&mut JOURNAL),
Trait Implementations§
§impl<BLOCK, TX, DB, CFG, JOURNAL, CHAIN> ContextSetters for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, DB, CFG, JOURNAL, CHAIN> ContextSetters for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
§impl<BLOCK, TX, DB, CFG, JOURNAL, CHAIN> ContextTr for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, DB, CFG, JOURNAL, CHAIN> ContextTr for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
type Block = BLOCK
type Tx = TX
type Cfg = CFG
type Db = DB
type Journal = JOURNAL
type Chain = CHAIN
fn tx(&self) -> &<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Tx
fn block( &self, ) -> &<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Block
fn cfg( &self, ) -> &<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Cfg
fn journal( &mut self, ) -> &mut <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Journal
fn journal_ref( &self, ) -> &<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Journal
fn db( &mut self, ) -> &mut <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Db
fn db_ref( &self, ) -> &<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Db
fn chain( &mut self, ) -> &mut <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Chain
fn error( &mut self, ) -> &mut Result<(), ContextError<<<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Db as Database>::Error>>
fn tx_journal( &mut self, ) -> (&mut <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Tx, &mut <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as ContextTr>::Journal)
§impl DefaultOp for Context<BlockEnv, OpTransaction<TxEnv>, CfgEnv<OpSpecId>, EmptyDBTyped<Infallible>, Journal<EmptyDBTyped<Infallible>>, L1BlockInfo>
impl DefaultOp for Context<BlockEnv, OpTransaction<TxEnv>, CfgEnv<OpSpecId>, EmptyDBTyped<Infallible>, Journal<EmptyDBTyped<Infallible>>, L1BlockInfo>
§fn op() -> Context<BlockEnv, OpTransaction<TxEnv>, CfgEnv<OpSpecId>, EmptyDBTyped<Infallible>, Journal<EmptyDBTyped<Infallible>>, L1BlockInfo>
fn op() -> Context<BlockEnv, OpTransaction<TxEnv>, CfgEnv<OpSpecId>, EmptyDBTyped<Infallible>, Journal<EmptyDBTyped<Infallible>>, L1BlockInfo>
§impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> MainBuilder for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> MainBuilder for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
type Context = Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
fn build_mainnet( self, ) -> Evm<<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as MainBuilder>::Context, (), EthInstructions<EthInterpreter, <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as MainBuilder>::Context>, EthPrecompiles>
fn build_mainnet_with_inspector<INSP>( self, inspector: INSP, ) -> Evm<<Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as MainBuilder>::Context, INSP, EthInstructions<EthInterpreter, <Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> as MainBuilder>::Context>, EthPrecompiles>
§impl<BLOCK, TX, CFG, DB, JOURNAL> OpBuilder for Context<BLOCK, TX, CFG, DB, JOURNAL, L1BlockInfo>where
BLOCK: Block,
TX: OpTxTr,
CFG: Cfg<Spec = OpSpecId>,
DB: Database,
JOURNAL: JournalTr<Database = DB, FinalOutput = JournalOutput>,
impl<BLOCK, TX, CFG, DB, JOURNAL> OpBuilder for Context<BLOCK, TX, CFG, DB, JOURNAL, L1BlockInfo>where
BLOCK: Block,
TX: OpTxTr,
CFG: Cfg<Spec = OpSpecId>,
DB: Database,
JOURNAL: JournalTr<Database = DB, FinalOutput = JournalOutput>,
§fn build_op(
self,
) -> OpEvm<<Context<BLOCK, TX, CFG, DB, JOURNAL, L1BlockInfo> as OpBuilder>::Context, ()>
fn build_op( self, ) -> OpEvm<<Context<BLOCK, TX, CFG, DB, JOURNAL, L1BlockInfo> as OpBuilder>::Context, ()>
§fn build_op_with_inspector<INSP>(
self,
inspector: INSP,
) -> OpEvm<<Context<BLOCK, TX, CFG, DB, JOURNAL, L1BlockInfo> as OpBuilder>::Context, INSP>
fn build_op_with_inspector<INSP>( self, inspector: INSP, ) -> OpEvm<<Context<BLOCK, TX, CFG, DB, JOURNAL, L1BlockInfo> as OpBuilder>::Context, INSP>
Auto Trait Implementations§
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> Freeze for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> RefUnwindSafe for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
BLOCK: RefUnwindSafe,
TX: RefUnwindSafe,
CFG: RefUnwindSafe,
JOURNAL: RefUnwindSafe,
CHAIN: RefUnwindSafe,
<DB as Database>::Error: RefUnwindSafe,
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> Send for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> Sync for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> Unpin for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
impl<BLOCK, TX, CFG, DB, JOURNAL, CHAIN> UnwindSafe for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>where
BLOCK: UnwindSafe,
TX: UnwindSafe,
CFG: UnwindSafe,
JOURNAL: UnwindSafe,
CHAIN: UnwindSafe,
<DB as Database>::Error: UnwindSafe,
Blanket Implementations§
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> 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<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
TxEnv
from a transaction and a sender address.§impl<CTX> Host for CTXwhere
CTX: ContextTr,
impl<CTX> Host for CTXwhere
CTX: ContextTr,
§fn balance(&mut self, address: Address) -> Option<StateLoad<Uint<256, 4>>>
fn balance(&mut self, address: Address) -> Option<StateLoad<Uint<256, 4>>>
Gets balance of address
and if the account is cold.
§fn load_account_code(&mut self, address: Address) -> Option<StateLoad<Bytes>>
fn load_account_code(&mut self, address: Address) -> Option<StateLoad<Bytes>>
Gets code of address
and if the account is cold.
§fn load_account_code_hash(
&mut self,
address: Address,
) -> Option<StateLoad<FixedBytes<32>>>
fn load_account_code_hash( &mut self, address: Address, ) -> Option<StateLoad<FixedBytes<32>>>
Gets code hash of address
and if the account is cold.
§fn sload(
&mut self,
address: Address,
index: Uint<256, 4>,
) -> Option<StateLoad<Uint<256, 4>>>
fn sload( &mut self, address: Address, index: Uint<256, 4>, ) -> Option<StateLoad<Uint<256, 4>>>
Gets storage value of address
at index
and if the account is cold.
§fn sstore(
&mut self,
address: Address,
index: Uint<256, 4>,
value: Uint<256, 4>,
) -> Option<StateLoad<SStoreResult>>
fn sstore( &mut self, address: Address, index: Uint<256, 4>, value: Uint<256, 4>, ) -> Option<StateLoad<SStoreResult>>
Sets storage value of account address at index.
Returns StateLoad
with SStoreResult
that contains original/new/old storage value.
§fn tload(&mut self, address: Address, index: Uint<256, 4>) -> Uint<256, 4>
fn tload(&mut self, address: Address, index: Uint<256, 4>) -> Uint<256, 4>
Gets the transient storage value of address
at index
.
§fn tstore(&mut self, address: Address, index: Uint<256, 4>, value: Uint<256, 4>)
fn tstore(&mut self, address: Address, index: Uint<256, 4>, value: Uint<256, 4>)
Sets the transient storage value of address
at index
.
§fn selfdestruct(
&mut self,
address: Address,
target: Address,
) -> Option<StateLoad<SelfDestructResult>>
fn selfdestruct( &mut self, address: Address, target: Address, ) -> Option<StateLoad<SelfDestructResult>>
Marks address
to be deleted, with funds transferred to target
.
§fn blob_gasprice(&self) -> Uint<256, 4>
fn blob_gasprice(&self) -> Uint<256, 4>
ContextTr::block().blob_gasprice()
§fn difficulty(&self) -> Uint<256, 4>
fn difficulty(&self) -> Uint<256, 4>
§fn prevrandao(&self) -> Option<Uint<256, 4>>
fn prevrandao(&self) -> Option<Uint<256, 4>>
§fn block_number(&self) -> u64
fn block_number(&self) -> u64
§fn beneficiary(&self) -> Address
fn beneficiary(&self) -> Address
§fn effective_gas_price(&self) -> Uint<256, 4>
fn effective_gas_price(&self) -> Uint<256, 4>
ContextTr::tx().effective_gas_price(basefee as u128)
§fn blob_hash(&self, number: usize) -> Option<Uint<256, 4>>
fn blob_hash(&self, number: usize) -> Option<Uint<256, 4>>
ContextTr::tx().blob_hash(number)
§fn max_initcode_size(&self) -> usize
fn max_initcode_size(&self) -> usize
ContextTr::cfg().max_code_size().saturating_mul(2)
§fn block_hash(&mut self, requested_number: u64) -> Option<FixedBytes<32>>
fn block_hash(&mut self, requested_number: u64) -> Option<FixedBytes<32>>
ContextTr::journal().db().block_hash(number)
§fn load_account_delegated(
&mut self,
address: Address,
) -> Option<StateLoad<AccountLoad>>
fn load_account_delegated( &mut self, address: Address, ) -> Option<StateLoad<AccountLoad>>
ContextTr::journal().load_account_delegated(address)
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> 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
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.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSendSync for T
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.