pub struct CachedPrecompileProvider<T, S>{ /* private fields */ }Available on crate feature
std only.Expand description
A caching EVM precompile provider.
Implementations§
Source§impl<T, S> CachedPrecompileProvider<T, S>
impl<T, S> CachedPrecompileProvider<T, S>
Sourcepub fn new(
inner: Precompiles<T>,
cache_map: PrecompileCacheMap<S>,
spec_id: S,
policy: PrecompileCachePolicy,
metrics_enabled: bool,
) -> Self
pub fn new( inner: Precompiles<T>, cache_map: PrecompileCacheMap<S>, spec_id: S, policy: PrecompileCachePolicy, metrics_enabled: bool, ) -> Self
Creates a new cached precompile provider.
Metrics are labelled by address and shared with the cache. Disable them for prewarming so speculative work does not count towards execution cache statistics.
Trait Implementations§
Source§impl<T, S> Debug for CachedPrecompileProvider<T, S>
impl<T, S> Debug for CachedPrecompileProvider<T, S>
Source§impl<T, S> PrecompileProvider<T> for CachedPrecompileProvider<T, S>
impl<T, S> PrecompileProvider<T> for CachedPrecompileProvider<T, S>
Source§fn warm_addresses(&self, warm: &mut PrewarmSet)
fn warm_addresses(&self, warm: &mut PrewarmSet)
Marks every precompile address as warm. Read more
Source§fn precompile_ids(&self) -> Vec<(Address, PrecompileId)>
fn precompile_ids(&self) -> Vec<(Address, PrecompileId)>
Returns precompile addresses and identifiers.
Source§fn move_precompiles(
&mut self,
moves: &[(Address, Address)],
) -> Result<(), MovePrecompileError>
fn move_precompiles( &mut self, moves: &[(Address, Address)], ) -> Result<(), MovePrecompileError>
Relocates installed precompiles, validating all sources before changing the provider. Read more
Auto Trait Implementations§
impl<T, S> !RefUnwindSafe for CachedPrecompileProvider<T, S>
impl<T, S> !UnwindSafe for CachedPrecompileProvider<T, S>
impl<T, S> Forget for CachedPrecompileProvider<T, S>
impl<T, S> Freeze for CachedPrecompileProvider<T, S>
impl<T, S> Move for CachedPrecompileProvider<T, S>
impl<T, S> Send for CachedPrecompileProvider<T, S>
impl<T, S> Sync for CachedPrecompileProvider<T, S>
impl<T, S> Unpin for CachedPrecompileProvider<T, S>
impl<T, S> UnsafeUnpin for CachedPrecompileProvider<T, S>where
Precompiles<T>: UnsafeUnpin,
PrecompileCacheMap<S>: UnsafeUnpin,
HashMap<Address, Arc<PrecompileCache<S>>, FbBuildHasher<20>>: UnsafeUnpin,
S: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§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>,
Source§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.