[][src]Struct elrond_wasm::storage::mut_storage::BorrowedMutStorage

pub struct BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigInt: Encode + 'static,
    BigUint: Encode + 'static,
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    T: Encode + Decode
{ /* fields omitted */ }

Contains a value taken from storage and a reference to the api. The value can be changed and will be saved back to storage when the lifetime of the BorrowedMutStorage expires. Optimization: will only save back to storage if the value is referenced with deref_mut(), because only in such way can it be changed.

Implementations

impl<'a, A, BigInt, BigUint, T> BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigInt: Encode + 'static,
    BigUint: Encode + 'static,
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    T: Encode + Decode
[src]

pub fn with_const_key(api: &'a A, key: &'static [u8]) -> Self[src]

pub fn with_generated_key(api: &'a A, key: Vec<u8>) -> Self[src]

Trait Implementations

impl<'a, A, BigInt, BigUint, T> Deref for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigInt: Encode + 'static,
    BigUint: Encode + 'static,
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    T: Encode + Decode
[src]

type Target = T

The resulting type after dereferencing.

impl<'a, A, BigInt, BigUint, T> DerefMut for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigUint: BigUintApi + 'static,
    BigInt: BigIntApi<BigUint> + 'static,
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    T: Encode + Decode
[src]

impl<'a, A, BigInt, BigUint, T> Drop for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigInt: Encode + 'static,
    BigUint: Encode + 'static,
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    T: Encode + Decode
[src]

impl<'a, A, BigInt, BigUint, T> EndpointResult<'a, A, BigInt, BigUint> for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigInt: BigIntApi<BigUint> + 'static,
    BigUint: BigUintApi + 'static,
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    T: Encode + Decode + EndpointResult<'a, A, BigInt, BigUint>, 
[src]

Auto Trait Implementations

impl<'a, A, BigInt, BigUint, T> Send for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    A: Sync,
    BigInt: Send,
    BigUint: Send,
    T: Send

impl<'a, A, BigInt, BigUint, T> Sync for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    A: Sync,
    BigInt: Sync,
    BigUint: Sync,
    T: Sync

impl<'a, A, BigInt, BigUint, T> Unpin for BorrowedMutStorage<'a, A, BigInt, BigUint, T> where
    BigInt: Unpin,
    BigUint: Unpin,
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, A, BigInt, BigUint, T> EndpointResult<'a, A, BigInt, BigUint> for T where
    A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
    BigInt: BigIntApi<BigUint> + 'static,
    BigUint: BigUintApi + 'static,
    T: Encode
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.