Struct nesdie::mock::VmContextBuilder
source · [−]pub struct VmContextBuilder { /* private fields */ }
Expand description
Simple VMContext builder that allows to quickly create custom context in tests.
Implementations
sourceimpl VmContextBuilder
impl VmContextBuilder
pub fn new() -> Self
pub fn current_account_id(&mut self, account_id: String) -> &mut Self
pub fn signer_account_id(&mut self, account_id: String) -> &mut Self
pub fn signer_account_pk(&mut self, pk: Vec<u8>) -> &mut Self
pub fn predecessor_account_id(&mut self, account_id: String) -> &mut Self
pub fn block_index(&mut self, block_index: u64) -> &mut Self
pub fn block_timestamp(&mut self, block_timestamp: u64) -> &mut Self
pub fn epoch_height(&mut self, epoch_height: u64) -> &mut Self
pub fn account_balance(&mut self, amount: Balance) -> &mut Self
pub fn account_locked_balance(&mut self, amount: Balance) -> &mut Self
pub fn storage_usage(&mut self, usage: u64) -> &mut Self
pub fn attached_deposit(&mut self, amount: Balance) -> &mut Self
pub fn prepaid_gas(&mut self, gas: Gas) -> &mut Self
pub fn random_seed(&mut self, seed: Vec<u8>) -> &mut Self
pub fn is_view(&mut self, is_view: bool) -> &mut Self
pub fn build(&self) -> VMContext
Trait Implementations
sourceimpl Clone for VmContextBuilder
impl Clone for VmContextBuilder
sourcefn clone(&self) -> VmContextBuilder
fn clone(&self) -> VmContextBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for VmContextBuilder
impl Send for VmContextBuilder
impl Sync for VmContextBuilder
impl Unpin for VmContextBuilder
impl UnwindSafe for VmContextBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more