pub struct CallTrap {
pub target: H160,
pub transfer: Option<Transfer>,
pub input: Vec<u8>,
pub gas: U256,
pub is_static: bool,
pub out_offset: U256,
pub out_len: U256,
pub context: Context,
pub scheme: CallScheme,
}
Expand description
Trap for a call.
Fields§
§target: H160
Call target.
transfer: Option<Transfer>
Transfer instruction, if any.
input: Vec<u8>
Input data.
gas: U256
Gas.
is_static: bool
Whether it is STATICCALL
out_offset: U256
Out value offset.
out_len: U256
Out value length.
context: Context
Call context.
scheme: CallScheme
Call scheme.
Implementations§
Source§impl CallTrap
impl CallTrap
Sourcepub fn new_from<S: AsRef<RuntimeState> + AsMut<RuntimeState>>(
scheme: CallScheme,
machine: &mut Machine<S>,
) -> Result<Self, ExitError>
pub fn new_from<S: AsRef<RuntimeState> + AsMut<RuntimeState>>( scheme: CallScheme, machine: &mut Machine<S>, ) -> Result<Self, ExitError>
Create a new call trap from the given call scheme and the machine state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallTrap
impl RefUnwindSafe for CallTrap
impl Send for CallTrap
impl Sync for CallTrap
impl Unpin for CallTrap
impl UnwindSafe for CallTrap
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> TrapConsume<T> for T
impl<T> TrapConsume<T> for T
Source§type Rest = Infallible
type Rest = Infallible
Rest type.
Source§fn consume(self) -> Result<T, Infallible>
fn consume(self) -> Result<T, Infallible>
Consume
T
to get Rest
.