pub struct OwnershipSnapshot {
pub snapshot_id: SnapshotId,
pub class_id: ClassId,
pub timestamp: Timestamp,
pub block_height: BlockHeight,
pub total_supply: u128,
pub holder_count: u64,
pub balances_root: [u8; 32],
pub purpose: SnapshotPurpose,
pub reference: Option<[u8; 32]>,
}Expand description
Ownership snapshot
Fields§
§snapshot_id: SnapshotIdSnapshot ID
class_id: ClassIdClass ID
timestamp: TimestampSnapshot timestamp
block_height: BlockHeightBlock height
total_supply: u128Total supply at snapshot
holder_count: u64Holder count
balances_root: [u8; 32]Merkle root of balances
purpose: SnapshotPurposePurpose
reference: Option<[u8; 32]>Reference
Implementations§
Source§impl OwnershipSnapshot
impl OwnershipSnapshot
Sourcepub fn generate_snapshot_id(
class_id: &ClassId,
purpose: SnapshotPurpose,
timestamp: Timestamp,
) -> SnapshotId
pub fn generate_snapshot_id( class_id: &ClassId, purpose: SnapshotPurpose, timestamp: Timestamp, ) -> SnapshotId
Generate snapshot ID
Trait Implementations§
Source§impl Clone for OwnershipSnapshot
impl Clone for OwnershipSnapshot
Source§fn clone(&self) -> OwnershipSnapshot
fn clone(&self) -> OwnershipSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OwnershipSnapshot
impl Debug for OwnershipSnapshot
Source§impl<'de> Deserialize<'de> for OwnershipSnapshot
impl<'de> Deserialize<'de> for OwnershipSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OwnershipSnapshot
impl PartialEq for OwnershipSnapshot
Source§fn eq(&self, other: &OwnershipSnapshot) -> bool
fn eq(&self, other: &OwnershipSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OwnershipSnapshot
impl Serialize for OwnershipSnapshot
impl Eq for OwnershipSnapshot
impl StructuralPartialEq for OwnershipSnapshot
Auto Trait Implementations§
impl Freeze for OwnershipSnapshot
impl RefUnwindSafe for OwnershipSnapshot
impl Send for OwnershipSnapshot
impl Sync for OwnershipSnapshot
impl Unpin for OwnershipSnapshot
impl UnsafeUnpin for OwnershipSnapshot
impl UnwindSafe for OwnershipSnapshot
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