pub struct Precompile { /* private fields */ }
Expand description
Precompile.
Implementations§
Source§impl Precompile
impl Precompile
Sourcepub const fn new(id: PrecompileId, address: Address, fn_: PrecompileFn) -> Self
pub const fn new(id: PrecompileId, address: Address, fn_: PrecompileFn) -> Self
Create new precompile.
Sourcepub fn id(&self) -> &PrecompileId
pub fn id(&self) -> &PrecompileId
Returns reference to precompile identifier.
Sourcepub fn precompile(&self) -> &PrecompileFn
pub fn precompile(&self) -> &PrecompileFn
Returns reference to precompile implementation.
Sourcepub fn execute(&self, input: &[u8], gas_limit: u64) -> PrecompileResult
pub fn execute(&self, input: &[u8], gas_limit: u64) -> PrecompileResult
Executes the precompile.
Trait Implementations§
Source§impl Clone for Precompile
impl Clone for Precompile
Source§fn clone(&self) -> Precompile
fn clone(&self) -> Precompile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Precompile
impl Debug for Precompile
Source§impl From<(PrecompileId, Address, fn(&[u8], u64) -> Result<PrecompileOutput, PrecompileError>)> for Precompile
impl From<(PrecompileId, Address, fn(&[u8], u64) -> Result<PrecompileOutput, PrecompileError>)> for Precompile
Source§fn from((id, address, fn_): (PrecompileId, Address, PrecompileFn)) -> Self
fn from((id, address, fn_): (PrecompileId, Address, PrecompileFn)) -> Self
Converts to this type from the input type.
Source§impl From<Precompile> for (PrecompileId, Address, PrecompileFn)
impl From<Precompile> for (PrecompileId, Address, PrecompileFn)
Source§fn from(value: Precompile) -> Self
fn from(value: Precompile) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Precompile
impl RefUnwindSafe for Precompile
impl Send for Precompile
impl Sync for Precompile
impl Unpin for Precompile
impl UnwindSafe for Precompile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more