Struct miden_objects::accounts::delta::AccountVaultDelta
source · pub struct AccountVaultDelta {
pub added_assets: Vec<Asset>,
pub removed_assets: Vec<Asset>,
}Expand description
AccountVaultDelta stores the difference between the initial and final account vault states.
The difference is represented as follows:
- added_assets: a vector of assets that were added to the account vault.
- removed_assets: a vector of assets that were removed from the account vault.
Fields§
§added_assets: Vec<Asset>§removed_assets: Vec<Asset>Implementations§
source§impl AccountVaultDelta
impl AccountVaultDelta
sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates an empty AccountVaultDelta.
sourcepub fn from_iterators<A, B>(added_assets: A, removed_assets: B) -> Self
pub fn from_iterators<A, B>(added_assets: A, removed_assets: B) -> Self
Creates an AccountVaultDelta from the given iterators.
sourcepub fn validate(&self) -> Result<(), AccountDeltaError>
pub fn validate(&self) -> Result<(), AccountDeltaError>
Trait Implementations§
source§impl Clone for AccountVaultDelta
impl Clone for AccountVaultDelta
source§fn clone(&self) -> AccountVaultDelta
fn clone(&self) -> AccountVaultDelta
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for AccountVaultDelta
impl Debug for AccountVaultDelta
source§impl Default for AccountVaultDelta
impl Default for AccountVaultDelta
source§fn default() -> AccountVaultDelta
fn default() -> AccountVaultDelta
Returns the “default value” for a type. Read more
source§impl Deserializable for AccountVaultDelta
impl Deserializable for AccountVaultDelta
source§fn read_from<R: ByteReader>(
source: &mut R
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source, attempts to deserialize these bytes
into Self, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl PartialEq for AccountVaultDelta
impl PartialEq for AccountVaultDelta
source§fn eq(&self, other: &AccountVaultDelta) -> bool
fn eq(&self, other: &AccountVaultDelta) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for AccountVaultDelta
impl Serializable for AccountVaultDelta
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self into bytes and writes these bytes into the target.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
impl Eq for AccountVaultDelta
impl StructuralPartialEq for AccountVaultDelta
Auto Trait Implementations§
impl Freeze for AccountVaultDelta
impl RefUnwindSafe for AccountVaultDelta
impl Send for AccountVaultDelta
impl Sync for AccountVaultDelta
impl Unpin for AccountVaultDelta
impl UnwindSafe for AccountVaultDelta
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