Struct bee_tangle::metadata::MessageMetadata [−][src]
pub struct MessageMetadata { /* fields omitted */ }
Metadata associated with a tangle message.
Implementations
impl MessageMetadata
[src]
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]
flags: Flags,
milestone_index: Option<MilestoneIndex>,
arrival_timestamp: u64,
solidification_timestamp: u64,
reference_timestamp: u64,
omrsi: Option<IndexId>,
ymrsi: Option<IndexId>,
conflict: ConflictReason
) -> Self
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 Clone for MessageMetadata
[src]fn clone(&self) -> MessageMetadata
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MessageMetadata
[src]
impl Copy for MessageMetadata
[src]impl Default for MessageMetadata
[src]
impl Default for MessageMetadata
[src]fn default() -> MessageMetadata
[src]
impl<B: StorageBackend> Hooks<MessageMetadata> for StorageHooks<B>
[src]
impl<B: StorageBackend> Hooks<MessageMetadata> for StorageHooks<B>
[src]type Error = B::Error
An error generated by these hooks.
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MessageId
) -> Pin<Box<dyn Future<Output = Result<Option<(Message, MessageMetadata)>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
id: &'life1 MessageId
) -> Pin<Box<dyn Future<Output = Result<Option<(Message, MessageMetadata)>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
id: MessageId,
tx: Message,
metadata: MessageMetadata
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
id: MessageId,
tx: Message,
metadata: MessageMetadata
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn fetch_approvers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MessageId
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<MessageId>>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
id: &'life1 MessageId
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<MessageId>>, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn insert_approver<'life0, 'async_trait>(
&'life0 self,
id: MessageId,
approver: MessageId
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
id: MessageId,
approver: MessageId
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn update_approvers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: MessageId,
approvers: &'life1 [MessageId]
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
id: MessageId,
approvers: &'life1 [MessageId]
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Packable for MessageMetadata
[src]
impl Packable for MessageMetadata
[src]type Error = MessageMetadataError
Associated error type.
fn packed_len(&self) -> usize
[src]
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
[src]
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R
) -> Result<Self, Self::Error>
[src]
reader: &mut R
) -> Result<Self, Self::Error>
pub fn pack_new(&self) -> Vec<u8, Global>
[src]
pub fn unpack<R>(reader: &mut R) -> Result<Self, Self::Error> where
R: Read + ?Sized,
[src]
R: Read + ?Sized,
pub fn unpack_unchecked<R>(reader: &mut R) -> Result<Self, Self::Error> where
R: Read + ?Sized,
[src]
R: Read + ?Sized,
impl Serialize for MessageMetadata
[src]
impl Serialize for MessageMetadata
[src]Auto Trait Implementations
impl RefUnwindSafe for MessageMetadata
impl RefUnwindSafe for MessageMetadata
impl Send for MessageMetadata
impl Send for MessageMetadata
impl Sync for MessageMetadata
impl Sync for MessageMetadata
impl Unpin for MessageMetadata
impl Unpin for MessageMetadata
impl UnwindSafe for MessageMetadata
impl UnwindSafe for MessageMetadata