pub struct mockCall_4Return {}Expand description
Mocks a call to an address, returning specified data. Calldata can either be strict or a partial match, e.g. if you only pass a Solidity selector to the expected calldata, then the entire Solidity function will be mocked.
Overload to control whether code is injected into callee. The other overloads etch a
single byte into an empty account to circumvent Solidity’s extcodesize check, with the
side effect that unmocked calls to it no longer revert; injectCode = false leaves the
account codeless, so unmocked calls to it revert in the caller. Mocked calls that return
data still succeed, as Solidity checks returndatasize() instead of extcodesize() when
return data is expected, but mocked calls to functions without return values may still
revert in the caller due to the extcodesize check.
Container type for the return parameters of the mockCall(address,bytes,bytes,bool) function.
Implementations§
Source§impl mockCall_4Return
impl mockCall_4Return
fn _tokenize(&self) -> <mockCall_4Call as SolCall>::ReturnToken<'_>
Trait Implementations§
Source§impl Clone for mockCall_4Return
impl Clone for mockCall_4Return
Source§fn clone(&self) -> mockCall_4Return
fn clone(&self) -> mockCall_4Return
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for mockCall_4Return
impl RefUnwindSafe for mockCall_4Return
impl Send for mockCall_4Return
impl Sync for mockCall_4Return
impl Unpin for mockCall_4Return
impl UnsafeUnpin for mockCall_4Return
impl UnwindSafe for mockCall_4Return
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes