pub struct JitEvm<EVM> {
inner: EVM,
backend: JitBackend,
lookup_cache: B256Map<LookupDecision>,
lookup_cache_spec_id: SpecId,
}Expand description
Mainnet EVM with JIT-compiled function dispatch.
Wraps an inner [EvmTr] and uses JitBackend to look up compiled
functions before falling back to the interpreter.
Implements [ExecuteEvm] so it can be used as a drop-in replacement for
the standard mainnet EVM.
Fields§
§inner: EVM§backend: JitBackend§lookup_cache: B256Map<LookupDecision>Cached lookup decisions keyed by code_hash alone.
Invalidated when the spec_id changes.
lookup_cache_spec_id: SpecIdThe spec_id the cache was built for; cleared on mismatch.
Implementations§
Source§impl<EVM> JitEvm<EVM>
impl<EVM> JitEvm<EVM>
Sourcepub fn into_inner(self) -> EVM
pub fn into_inner(self) -> EVM
Consumes the JIT EVM and returns the inner EVM.
Sourcepub const fn backend(&self) -> &JitBackend
pub const fn backend(&self) -> &JitBackend
Returns a reference to the JIT backend.
Sourcepub fn backend_mut(&mut self) -> &mut JitBackend
pub fn backend_mut(&mut self) -> &mut JitBackend
Returns a mutable reference to the JIT backend.
Sourcepub fn set_backend(&mut self, backend: JitBackend)
pub fn set_backend(&mut self, backend: JitBackend)
Replaces the JIT backend and clears the lookup cache.
Source§impl<EVM: EvmTr> JitEvm<EVM>where
EVM::Context: ContextTr,
impl<EVM: EvmTr> JitEvm<EVM>where
EVM::Context: ContextTr,
Sourcepub fn disabled(inner: EVM) -> Self
pub fn disabled(inner: EVM) -> Self
Creates a new JIT EVM with a disabled backend.
Equivalent to JitEvm::new(inner, JitBackend::disabled()).
Sourcepub fn new(inner: EVM, backend: JitBackend) -> Self
pub fn new(inner: EVM, backend: JitBackend) -> Self
Creates a new JIT EVM from an inner EVM and backend.
fn invalidate_cache(&mut self)
Trait Implementations§
Source§impl<EVM> EvmTr for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>>,
impl<EVM> EvmTr for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>>,
Source§type Context = <EVM as EvmTr>::Context
type Context = <EVM as EvmTr>::Context
Source§type Instructions = <EVM as EvmTr>::Instructions
type Instructions = <EVM as EvmTr>::Instructions
Source§type Precompiles = <EVM as EvmTr>::Precompiles
type Precompiles = <EVM as EvmTr>::Precompiles
Source§fn all(
&self,
) -> (&Self::Context, &Self::Instructions, &Self::Precompiles, &FrameStack<Self::Frame>)
fn all( &self, ) -> (&Self::Context, &Self::Instructions, &Self::Precompiles, &FrameStack<Self::Frame>)
Source§fn all_mut(
&mut self,
) -> (&mut Self::Context, &mut Self::Instructions, &mut Self::Precompiles, &mut FrameStack<Self::Frame>)
fn all_mut( &mut self, ) -> (&mut Self::Context, &mut Self::Instructions, &mut Self::Precompiles, &mut FrameStack<Self::Frame>)
Source§fn frame_init(
&mut self,
frame_input: <Self::Frame as FrameTr>::FrameInit,
) -> Result<ItemOrResult<&mut Self::Frame, <Self::Frame as FrameTr>::FrameResult>, ContextDbError<Self::Context>>
fn frame_init( &mut self, frame_input: <Self::Frame as FrameTr>::FrameInit, ) -> Result<ItemOrResult<&mut Self::Frame, <Self::Frame as FrameTr>::FrameResult>, ContextDbError<Self::Context>>
Source§fn frame_run(
&mut self,
) -> Result<FrameInitOrResult<Self::Frame>, ContextDbError<Self::Context>>
fn frame_run( &mut self, ) -> Result<FrameInitOrResult<Self::Frame>, ContextDbError<Self::Context>>
Source§fn frame_return_result(
&mut self,
result: <Self::Frame as FrameTr>::FrameResult,
) -> Result<Option<<Self::Frame as FrameTr>::FrameResult>, ContextDbError<Self::Context>>
fn frame_return_result( &mut self, result: <Self::Frame as FrameTr>::FrameResult, ) -> Result<Option<<Self::Frame as FrameTr>::FrameResult>, ContextDbError<Self::Context>>
§fn ctx_instructions(&mut self) -> (&mut Self::Context, &mut Self::Instructions)
fn ctx_instructions(&mut self) -> (&mut Self::Context, &mut Self::Instructions)
§fn ctx_precompiles(&mut self) -> (&mut Self::Context, &mut Self::Precompiles)
fn ctx_precompiles(&mut self) -> (&mut Self::Context, &mut Self::Precompiles)
§fn frame_stack(&mut self) -> &mut FrameStack<Self::Frame>
fn frame_stack(&mut self) -> &mut FrameStack<Self::Frame>
Source§impl<EVM> ExecuteCommitEvm for JitEvm<EVM>where
Self: ExecuteEvm<State = EvmState>,
EVM: EvmTr<Context: ContextTr<Db: DatabaseCommit>>,
impl<EVM> ExecuteCommitEvm for JitEvm<EVM>where
Self: ExecuteEvm<State = EvmState>,
EVM: EvmTr<Context: ContextTr<Db: DatabaseCommit>>,
§fn commit_inner(&mut self)
fn commit_inner(&mut self)
§fn transact_commit(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_commit( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>
§fn transact_many_commit(
&mut self,
txs: impl Iterator<Item = Self::Tx>,
) -> Result<Vec<Self::ExecutionResult>, TransactionIndexedError<Self::Error>>
fn transact_many_commit( &mut self, txs: impl Iterator<Item = Self::Tx>, ) -> Result<Vec<Self::ExecutionResult>, TransactionIndexedError<Self::Error>>
§fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error>
fn replay_commit(&mut self) -> Result<Self::ExecutionResult, Self::Error>
Source§impl<EVM> ExecuteEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState>> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>>,
impl<EVM> ExecuteEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState>> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>>,
Source§type ExecutionResult = ExecutionResult
type ExecutionResult = ExecutionResult
Source§type State = HashMap<Address, Account, FbBuildHasher<20>>
type State = HashMap<Address, Account, FbBuildHasher<20>>
Source§type Error = EVMError<<<<EVM as EvmTr>::Context as ContextTr>::Db as Database>::Error>
type Error = EVMError<<<<EVM as EvmTr>::Context as ContextTr>::Db as Database>::Error>
Source§fn transact_one(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_one( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>
Source§fn finalize(&mut self) -> Self::State
fn finalize(&mut self) -> Self::State
Source§fn replay(&mut self) -> Result<ResultAndState<HaltReason>, Self::Error>
fn replay(&mut self) -> Result<ResultAndState<HaltReason>, Self::Error>
§fn transact(
&mut self,
tx: Self::Tx,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn transact( &mut self, tx: Self::Tx, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
Source§impl<EVM> InspectCommitEvm for JitEvm<EVM>where
Self: InspectEvm + ExecuteCommitEvm,
impl<EVM> InspectCommitEvm for JitEvm<EVM>where
Self: InspectEvm + ExecuteCommitEvm,
§fn inspect_tx_commit(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_tx_commit( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>
InspectEvm::inspect_tx]
and commit the state diff to the database.§fn inspect_commit(
&mut self,
tx: Self::Tx,
inspector: Self::Inspector,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_commit( &mut self, tx: Self::Tx, inspector: Self::Inspector, ) -> Result<Self::ExecutionResult, Self::Error>
InspectEvm::inspect]
and commit the state diff to the database.Source§impl<EVM> InspectEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState> + JournalExt> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>> + InspectorEvmTr,
impl<EVM> InspectEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState> + JournalExt> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>> + InspectorEvmTr,
Source§type Inspector = <EVM as InspectorEvmTr>::Inspector
type Inspector = <EVM as InspectorEvmTr>::Inspector
Source§fn set_inspector(&mut self, inspector: Self::Inspector)
fn set_inspector(&mut self, inspector: Self::Inspector)
Source§fn inspect_one_tx(
&mut self,
tx: Self::Tx,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_one_tx( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>
§fn inspect_tx(
&mut self,
tx: Self::Tx,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn inspect_tx( &mut self, tx: Self::Tx, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
§fn inspect(
&mut self,
tx: Self::Tx,
inspector: Self::Inspector,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn inspect( &mut self, tx: Self::Tx, inspector: Self::Inspector, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
§fn inspect_one(
&mut self,
tx: Self::Tx,
inspector: Self::Inspector,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_one( &mut self, tx: Self::Tx, inspector: Self::Inspector, ) -> Result<Self::ExecutionResult, Self::Error>
Source§impl<EVM> InspectSystemCallEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState> + JournalExt, Tx: SystemCallTx> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>> + InspectorEvmTr,
impl<EVM> InspectSystemCallEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState> + JournalExt, Tx: SystemCallTx> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>> + InspectorEvmTr,
Source§fn inspect_one_system_call_with_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_one_system_call_with_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
§fn inspect_one_system_call(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_one_system_call( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
§fn inspect_system_call(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn inspect_system_call( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
§fn inspect_system_call_with_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn inspect_system_call_with_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
§fn inspect_one_system_call_with_inspector(
&mut self,
system_contract_address: Address,
data: Bytes,
inspector: Self::Inspector,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_one_system_call_with_inspector( &mut self, system_contract_address: Address, data: Bytes, inspector: Self::Inspector, ) -> Result<Self::ExecutionResult, Self::Error>
§fn inspect_system_call_with_inspector(
&mut self,
system_contract_address: Address,
data: Bytes,
inspector: Self::Inspector,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn inspect_system_call_with_inspector( &mut self, system_contract_address: Address, data: Bytes, inspector: Self::Inspector, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
§fn inspect_one_system_call_with_inspector_and_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
inspector: Self::Inspector,
) -> Result<Self::ExecutionResult, Self::Error>
fn inspect_one_system_call_with_inspector_and_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, inspector: Self::Inspector, ) -> Result<Self::ExecutionResult, Self::Error>
§fn inspect_system_call_with_inspector_and_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
inspector: Self::Inspector,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn inspect_system_call_with_inspector_and_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, inspector: Self::Inspector, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
Source§impl<EVM> InspectorEvmTr for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>> + InspectorEvmTr,
impl<EVM> InspectorEvmTr for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>> + InspectorEvmTr,
Source§type Inspector = <EVM as InspectorEvmTr>::Inspector
type Inspector = <EVM as InspectorEvmTr>::Inspector
Source§fn all_inspector(
&self,
) -> (&Self::Context, &Self::Instructions, &Self::Precompiles, &FrameStack<Self::Frame>, &Self::Inspector)
fn all_inspector( &self, ) -> (&Self::Context, &Self::Instructions, &Self::Precompiles, &FrameStack<Self::Frame>, &Self::Inspector)
Source§fn all_mut_inspector(
&mut self,
) -> (&mut Self::Context, &mut Self::Instructions, &mut Self::Precompiles, &mut FrameStack<Self::Frame>, &mut Self::Inspector)
fn all_mut_inspector( &mut self, ) -> (&mut Self::Context, &mut Self::Instructions, &mut Self::Precompiles, &mut FrameStack<Self::Frame>, &mut Self::Inspector)
Source§fn inspect_frame_run(
&mut self,
) -> Result<FrameInitOrResult<Self::Frame>, ContextDbError<Self::Context>>
fn inspect_frame_run( &mut self, ) -> Result<FrameInitOrResult<Self::Frame>, ContextDbError<Self::Context>>
§fn ctx_inspector(&mut self) -> (&mut Self::Context, &mut Self::Inspector)
fn ctx_inspector(&mut self) -> (&mut Self::Context, &mut Self::Inspector)
§fn ctx_inspector_frame(
&mut self,
) -> (&mut Self::Context, &mut Self::Inspector, &mut Self::Frame)
fn ctx_inspector_frame( &mut self, ) -> (&mut Self::Context, &mut Self::Inspector, &mut Self::Frame)
§fn ctx_inspector_frame_instructions(
&mut self,
) -> (&mut Self::Context, &mut Self::Inspector, &mut Self::Frame, &mut Self::Instructions)
fn ctx_inspector_frame_instructions( &mut self, ) -> (&mut Self::Context, &mut Self::Inspector, &mut Self::Frame, &mut Self::Instructions)
§fn inspect_frame_init(
&mut self,
frame_init: <Self::Frame as FrameTr>::FrameInit,
) -> Result<ItemOrResult<&mut Self::Frame, <Self::Frame as FrameTr>::FrameResult>, ContextError<<<Self::Context as ContextTr>::Db as Database>::Error>>
fn inspect_frame_init( &mut self, frame_init: <Self::Frame as FrameTr>::FrameInit, ) -> Result<ItemOrResult<&mut Self::Frame, <Self::Frame as FrameTr>::FrameResult>, ContextError<<<Self::Context as ContextTr>::Db as Database>::Error>>
Source§impl<EVM> SystemCallCommitEvm for JitEvm<EVM>where
Self: SystemCallEvm<State = EvmState> + ExecuteCommitEvm,
EVM: EvmTr<Context: ContextTr<Db: DatabaseCommit>>,
impl<EVM> SystemCallCommitEvm for JitEvm<EVM>where
Self: SystemCallEvm<State = EvmState> + ExecuteCommitEvm,
EVM: EvmTr<Context: ContextTr<Db: DatabaseCommit>>,
Source§fn system_call_with_caller_commit(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn system_call_with_caller_commit( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
SystemCallCommitEvm::system_call_commit] with a custom caller.§fn system_call_commit(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn system_call_commit( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
§fn transact_system_call_commit(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_system_call_commit( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
Use system_call_commit instead
§fn transact_system_call_with_caller_commit(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_system_call_with_caller_commit( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
Use system_call_with_caller_commit instead
SystemCallCommitEvm::system_call_commit] with a custom caller.Source§impl<EVM> SystemCallEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState>, Tx: SystemCallTx> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>>,
impl<EVM> SystemCallEvm for JitEvm<EVM>where
EVM: EvmTr<Frame = EthFrame, Context: ContextTr<Journal: JournalTr<State = EvmState>, Tx: SystemCallTx> + ContextSetters, Precompiles: PrecompileProvider<EVM::Context, Output = InterpreterResult>>,
Source§fn system_call_one_with_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn system_call_one_with_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
§fn system_call_one(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn system_call_one( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
§fn system_call(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn system_call( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
SystemCallEvm::system_call_with_caller].§fn system_call_with_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn system_call_with_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
SystemCallEvm::system_call_one] and [ExecuteEvm::finalize] functions to obtain the changed state.§fn transact_system_call_with_caller(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_system_call_with_caller( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
Use system_call_one_with_caller instead
§fn transact_system_call(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<Self::ExecutionResult, Self::Error>
fn transact_system_call( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<Self::ExecutionResult, Self::Error>
Use system_call_one instead
SystemCallEvm::system_call_one] with [SYSTEM_ADDRESS] as a caller.§fn transact_system_call_finalize(
&mut self,
system_contract_address: Address,
data: Bytes,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn transact_system_call_finalize( &mut self, system_contract_address: Address, data: Bytes, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
Use system_call instead
§fn transact_system_call_with_caller_finalize(
&mut self,
caller: Address,
system_contract_address: Address,
data: Bytes,
) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
fn transact_system_call_with_caller_finalize( &mut self, caller: Address, system_contract_address: Address, data: Bytes, ) -> Result<ExecResultAndState<Self::ExecutionResult, Self::State>, Self::Error>
Use system_call_with_caller instead
SystemCallEvm::system_call_one] and finalize functions.Auto Trait Implementations§
impl<EVM> Freeze for JitEvm<EVM>where
EVM: Freeze,
impl<EVM> !RefUnwindSafe for JitEvm<EVM>
impl<EVM> Send for JitEvm<EVM>where
EVM: Send,
impl<EVM> Sync for JitEvm<EVM>where
EVM: Sync,
impl<EVM> Unpin for JitEvm<EVM>where
EVM: Unpin,
impl<EVM> UnsafeUnpin for JitEvm<EVM>where
EVM: UnsafeUnpin,
impl<EVM> !UnwindSafe for JitEvm<EVM>
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
§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<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> 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>
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.