Struct identity_iota::iota::block::output::OutputMetadata
source · pub struct OutputMetadata { /* private fields */ }
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
) -> OutputMetadata
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 ) -> OutputMetadata
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 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 OutputMetadata
impl Debug for OutputMetadata
source§impl<'de> Deserialize<'de> for OutputMetadata
impl<'de> Deserialize<'de> for OutputMetadata
source§fn deserialize<D>(
d: D
) -> Result<OutputMetadata, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
d: D
) -> Result<OutputMetadata, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for OutputMetadata
impl Serialize for OutputMetadata
source§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<OutputMetadataDto> for OutputMetadata
impl TryFrom<OutputMetadataDto> for OutputMetadata
impl Copy for OutputMetadata
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 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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
source§fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from a string of JSON text.source§fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from bytes of JSON text.source§fn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize
Self
from a serde_json::Value
.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
source§fn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize
self
as a serde_json::Value
.