pub struct SimBlock {
pub block_overrides: Option<BlockOverrides>,
pub state_overrides: Option<StateOverride>,
pub calls: Vec<TransactionRequest>,
}
Expand description
Represents a batch of calls to be simulated sequentially within a block. This struct includes block and state overrides as well as the transaction requests to be executed.
Fields§
§block_overrides: Option<BlockOverrides>
Modifications to the default block characteristics.
state_overrides: Option<StateOverride>
State modifications to apply before executing the transactions.
calls: Vec<TransactionRequest>
A vector of transactions to be simulated.
Implementations§
Source§impl SimBlock
impl SimBlock
Sourcepub fn with_state_overrides(self, overrides: StateOverride) -> Self
pub fn with_state_overrides(self, overrides: StateOverride) -> Self
Enables state overrides
Sourcepub fn with_block_overrides(self, overrides: BlockOverrides) -> Self
pub fn with_block_overrides(self, overrides: BlockOverrides) -> Self
Enables block overrides
Sourcepub fn call(self, call: TransactionRequest) -> Self
pub fn call(self, call: TransactionRequest) -> Self
Adds a call to the block.
Sourcepub fn extend_calls(
self,
calls: impl IntoIterator<Item = TransactionRequest>,
) -> Self
pub fn extend_calls( self, calls: impl IntoIterator<Item = TransactionRequest>, ) -> Self
Adds multiple calls to the block.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SimBlock
impl<'de> Deserialize<'de> for SimBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SimBlock
impl RefUnwindSafe for SimBlock
impl Send for SimBlock
impl Sync for SimBlock
impl Unpin for SimBlock
impl UnwindSafe for SimBlock
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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