pub struct OutputMetadata { /* private fields */ }Available on crate feature
block only.Expand description
Metadata of an Output.
Implementations§
Source§impl OutputMetadata
impl OutputMetadata
Sourcepub fn new(
block_id: BlockId,
output_id: OutputId,
is_spent: bool,
milestone_index_spent: Option<u32>,
milestone_timestamp_spent: Option<u32>,
transaction_id_spent: Option<TransactionId>,
milestone_index_booked: u32,
milestone_timestamp_booked: u32,
ledger_index: u32,
) -> Self
pub fn new( block_id: BlockId, output_id: OutputId, is_spent: bool, milestone_index_spent: Option<u32>, milestone_timestamp_spent: Option<u32>, transaction_id_spent: Option<TransactionId>, milestone_index_booked: u32, milestone_timestamp_booked: u32, ledger_index: u32, ) -> Self
Creates a new OutputMetadata.
Sourcepub fn block_id(&self) -> &BlockId
pub fn block_id(&self) -> &BlockId
Returns the block id of the OutputMetadata.
Sourcepub fn output_id(&self) -> &OutputId
pub fn output_id(&self) -> &OutputId
Returns the output id of the OutputMetadata.
Sourcepub fn transaction_id(&self) -> &TransactionId
pub fn transaction_id(&self) -> &TransactionId
Returns the transaction id of the OutputMetadata.
Sourcepub fn output_index(&self) -> u16
pub fn output_index(&self) -> u16
Returns the output index of the OutputMetadata.
Sourcepub fn milestone_index_spent(&self) -> Option<u32>
pub fn milestone_index_spent(&self) -> Option<u32>
Returns the milestone index spent of the OutputMetadata.
Sourcepub fn milestone_timestamp_spent(&self) -> Option<u32>
pub fn milestone_timestamp_spent(&self) -> Option<u32>
Returns the milestone timestamp spent of the OutputMetadata.
Sourcepub fn transaction_id_spent(&self) -> Option<&TransactionId>
pub fn transaction_id_spent(&self) -> Option<&TransactionId>
Returns the transaction id spent of the OutputMetadata.
Sourcepub fn milestone_index_booked(&self) -> u32
pub fn milestone_index_booked(&self) -> u32
Returns the milestone index booked of the OutputMetadata.
Sourcepub fn milestone_timestamp_booked(&self) -> u32
pub fn milestone_timestamp_booked(&self) -> u32
Returns the milestone timestamp booked of the OutputMetadata.
Sourcepub fn ledger_index(&self) -> u32
pub fn ledger_index(&self) -> u32
Returns the ledger index of the OutputMetadata.
Trait Implementations§
Source§impl Clone for OutputMetadata
impl Clone for OutputMetadata
Source§fn clone(&self) -> OutputMetadata
fn clone(&self) -> OutputMetadata
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 OutputMetadata
impl Debug for OutputMetadata
Source§impl<'de> Deserialize<'de> for OutputMetadata
impl<'de> Deserialize<'de> for OutputMetadata
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 From<&OutputMetadata> for OutputMetadataDto
Available on crate feature dto only.
impl From<&OutputMetadata> for OutputMetadataDto
Available on crate feature
dto only.Source§fn from(output_metadata: &OutputMetadata) -> Self
fn from(output_metadata: &OutputMetadata) -> Self
Converts to this type from the input type.
Source§impl Hash for OutputMetadata
impl Hash for OutputMetadata
Source§impl PartialEq for OutputMetadata
impl PartialEq for OutputMetadata
Source§fn eq(&self, other: &OutputMetadata) -> bool
fn eq(&self, other: &OutputMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OutputMetadata
impl Serialize for OutputMetadata
Source§impl TryFrom<&OutputMetadataDto> for OutputMetadata
Available on crate feature dto only.
impl TryFrom<&OutputMetadataDto> for OutputMetadata
Available on crate feature
dto only.impl Eq for OutputMetadata
impl StructuralPartialEq for OutputMetadata
Auto Trait Implementations§
impl Freeze for OutputMetadata
impl RefUnwindSafe for OutputMetadata
impl Send for OutputMetadata
impl Sync for OutputMetadata
impl Unpin for OutputMetadata
impl UnsafeUnpin for OutputMetadata
impl UnwindSafe for OutputMetadata
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