Struct near_sdk::test_utils::VMContextBuilder [−][src]
Simple VMContext builder that allows to quickly create custom context in tests.
Fields
context: VMContext
Implementations
impl VMContextBuilder
[src]
pub fn new() -> Self
[src]
pub fn current_account_id(&mut self, account_id: ValidAccountId) -> &mut Self
[src]
pub fn signer_account_id(&mut self, account_id: ValidAccountId) -> &mut Self
[src]
pub fn signer_account_pk(&mut self, pk: PublicKey) -> &mut Self
[src]
pub fn predecessor_account_id(
&mut self,
account_id: ValidAccountId
) -> &mut Self
[src]
&mut self,
account_id: ValidAccountId
) -> &mut Self
pub fn block_index(&mut self, block_index: BlockHeight) -> &mut Self
[src]
pub fn block_timestamp(&mut self, block_timestamp: u64) -> &mut Self
[src]
pub fn epoch_height(&mut self, epoch_height: EpochHeight) -> &mut Self
[src]
pub fn account_balance(&mut self, amount: Balance) -> &mut Self
[src]
pub fn account_locked_balance(&mut self, amount: Balance) -> &mut Self
[src]
pub fn storage_usage(&mut self, usage: StorageUsage) -> &mut Self
[src]
pub fn attached_deposit(&mut self, amount: Balance) -> &mut Self
[src]
pub fn prepaid_gas(&mut self, gas: Gas) -> &mut Self
[src]
pub fn random_seed(&mut self, seed: Vec<u8>) -> &mut Self
[src]
pub fn is_view(&mut self, is_view: bool) -> &mut Self
[src]
pub fn build(&self) -> VMContext
[src]
Trait Implementations
impl Clone for VMContextBuilder
[src]
fn clone(&self) -> VMContextBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for VMContextBuilder
impl Send for VMContextBuilder
impl Sync for VMContextBuilder
impl Unpin for VMContextBuilder
impl UnwindSafe for VMContextBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,