[−][src]Struct elrond_wasm::storage::mut_storage::BorrowedMutStorage
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]
BigInt: Encode + 'static,
BigUint: Encode + 'static,
A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
T: Encode + Decode,
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]
BigInt: Encode + 'static,
BigUint: Encode + 'static,
A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
T: Encode + Decode,
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]
BigUint: BigUintApi + 'static,
BigInt: BigIntApi<BigUint> + 'static,
A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
T: Encode + Decode,
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]
BigInt: Encode + 'static,
BigUint: Encode + 'static,
A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
T: Encode + Decode,
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]
BigInt: BigIntApi<BigUint> + 'static,
BigUint: BigUintApi + 'static,
A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
T: Encode + Decode + EndpointResult<'a, A, BigInt, BigUint>,
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,
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,
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,
BigInt: Unpin,
BigUint: Unpin,
T: Unpin,
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,
fn borrow_mut(&mut self) -> &mut T
[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]
A: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + 'a,
BigInt: BigIntApi<BigUint> + 'static,
BigUint: BigUintApi + 'static,
T: Encode,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,