Struct bee_tangle::metadata::MessageMetadata[][src]

pub struct MessageMetadata { /* fields omitted */ }

Metadata associated with a tangle message.

Implementations

impl MessageMetadata[src]

pub fn new(
    flags: Flags,
    milestone_index: Option<MilestoneIndex>,
    arrival_timestamp: u64,
    solidification_timestamp: u64,
    reference_timestamp: u64,
    omrsi: Option<IndexId>,
    ymrsi: Option<IndexId>,
    conflict: ConflictReason
) -> Self
[src]

Create a new instance of a message’s metadata.

pub fn arrived() -> Self[src]

Create metadata that corresponds to a just-arrived message using the current system time.

pub fn flags(&self) -> &Flags[src]

Get the flags associated with this metadata.

pub fn flags_mut(&mut self) -> &mut Flags[src]

Get a mutable reference to the flags associated with this metadata.

pub fn milestone_index(&self) -> Option<MilestoneIndex>[src]

Get the milestone index of this message.

pub fn set_milestone_index(&mut self, index: MilestoneIndex)[src]

Set the milestone index of this message.

pub fn arrival_timestamp(&self) -> u64[src]

Get the arrival timestamp (seconds from the unix epoch) of this message.

pub fn solidification_timestamp(&self) -> u64[src]

Get the solidification timestamp (seconds from the unix epoch) of this message.

pub fn omrsi(&self) -> Option<IndexId>[src]

Get the oldest message root snapshot index of this message.

pub fn set_omrsi(&mut self, omrsi: IndexId)[src]

Set the oldest message root snapshot index of this message.

pub fn ymrsi(&self) -> Option<IndexId>[src]

Get the youngest message root snapshot index of this message.

pub fn set_ymrsi(&mut self, ymrsi: IndexId)[src]

Set the youngest message root snapshot index of this message.

pub fn reference_timestamp(&self) -> u64[src]

Get the reference timestamp (seconds from the unix epoch) of this message.

pub fn mark_solid(&mut self)[src]

Mark this message as solid at the current system time.

pub fn reference(&mut self, timestamp: u64)[src]

Reference this message with the given timestamp.

pub fn conflict(&self) -> ConflictReason[src]

Get the conflict state of this message.

pub fn set_conflict(&mut self, conflict: ConflictReason)[src]

Set the conflict state of this message.

Trait Implementations

impl Clone for MessageMetadata[src]

impl Copy for MessageMetadata[src]

impl Debug for MessageMetadata[src]

impl Default for MessageMetadata[src]

impl<B: StorageBackend> Hooks<MessageMetadata> for StorageHooks<B>[src]

type Error = B::Error

An error generated by these hooks.

impl Packable for MessageMetadata[src]

type Error = MessageMetadataError

Associated error type.

impl Serialize for MessageMetadata[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,