Struct bee_message::payload::milestone::MilestonePayload
source · [−]pub struct MilestonePayload { /* private fields */ }Expand description
A payload which defines the inclusion set of other messages in the Tangle.
Implementations
sourceimpl MilestonePayload
impl MilestonePayload
sourcepub fn new(
essence: MilestonePayloadEssence,
signatures: Vec<[u8; 64]>
) -> Result<Self, Error>
pub fn new(
essence: MilestonePayloadEssence,
signatures: Vec<[u8; 64]>
) -> Result<Self, Error>
Creates a new MilestonePayload.
sourcepub fn id(&self) -> MilestoneId
pub fn id(&self) -> MilestoneId
Computes the identifier of a MilestonePayload.
sourcepub fn essence(&self) -> &MilestonePayloadEssence
pub fn essence(&self) -> &MilestonePayloadEssence
Returns the essence of a MilestonePayload.
Trait Implementations
sourceimpl Clone for MilestonePayload
impl Clone for MilestonePayload
sourcefn clone(&self) -> MilestonePayload
fn clone(&self) -> MilestonePayload
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for MilestonePayload
impl Debug for MilestonePayload
sourceimpl From<MilestonePayload> for Payload
impl From<MilestonePayload> for Payload
sourcefn from(payload: MilestonePayload) -> Self
fn from(payload: MilestonePayload) -> Self
Converts to this type from the input type.
sourceimpl Packable for MilestonePayload
impl Packable for MilestonePayload
sourcefn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
sourcefn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
Packs the instance to bytes and writes them to the passed writer.
sourcefn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R
) -> Result<Self, Self::Error>
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R
) -> Result<Self, Self::Error>
Reads bytes from the passed reader and unpacks them into an instance.
sourcefn pack_new(&self) -> Vec<u8, Global>
fn pack_new(&self) -> Vec<u8, Global>
Packs the instance to bytes and writes them to a newly allocated vector.
sourceimpl PartialEq<MilestonePayload> for MilestonePayload
impl PartialEq<MilestonePayload> for MilestonePayload
sourcefn eq(&self, other: &MilestonePayload) -> bool
fn eq(&self, other: &MilestonePayload) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MilestonePayload) -> bool
fn ne(&self, other: &MilestonePayload) -> bool
This method tests for !=.
impl Eq for MilestonePayload
impl StructuralEq for MilestonePayload
impl StructuralPartialEq for MilestonePayload
Auto Trait Implementations
impl RefUnwindSafe for MilestonePayload
impl Send for MilestonePayload
impl Sync for MilestonePayload
impl Unpin for MilestonePayload
impl UnwindSafe for MilestonePayload
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more