Struct bee_message::prelude::MilestonePayloadEssence
source · [−]pub struct MilestonePayloadEssence { /* private fields */ }Expand description
Essence of a milestone payload. This is the signed part of a milestone payload.
Implementations
sourceimpl MilestonePayloadEssence
impl MilestonePayloadEssence
sourcepub fn new(
index: MilestoneIndex,
timestamp: u64,
parents: Parents,
merkle_proof: [u8; 32],
next_pow_score: u32,
next_pow_score_milestone_index: u32,
public_keys: Vec<[u8; 32]>,
receipt: Option<Payload>
) -> Result<Self, Error>
pub fn new(
index: MilestoneIndex,
timestamp: u64,
parents: Parents,
merkle_proof: [u8; 32],
next_pow_score: u32,
next_pow_score_milestone_index: u32,
public_keys: Vec<[u8; 32]>,
receipt: Option<Payload>
) -> Result<Self, Error>
Creates a new MilestonePayloadEssence.
sourcepub fn index(&self) -> MilestoneIndex
pub fn index(&self) -> MilestoneIndex
Returns the index of a MilestonePayloadEssence.
sourcepub fn merkle_proof(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn merkle_proof(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns the merkle proof of a MilestonePayloadEssence.
sourcepub fn next_pow_score(&self) -> u32
pub fn next_pow_score(&self) -> u32
Returns the next proof of work score of a MilestonePayloadEssence.
sourcepub fn next_pow_score_milestone_index(&self) -> u32
pub fn next_pow_score_milestone_index(&self) -> u32
Returns the newt proof of work index of a MilestonePayloadEssence.
sourcepub fn public_keys(&self) -> &Vec<[u8; 32]>
pub fn public_keys(&self) -> &Vec<[u8; 32]>
Returns the public keys of a MilestonePayloadEssence.
Trait Implementations
sourceimpl Clone for MilestonePayloadEssence
impl Clone for MilestonePayloadEssence
sourcefn clone(&self) -> MilestonePayloadEssence
fn clone(&self) -> MilestonePayloadEssence
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 MilestonePayloadEssence
impl Debug for MilestonePayloadEssence
sourceimpl Packable for MilestonePayloadEssence
impl Packable for MilestonePayloadEssence
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<MilestonePayloadEssence> for MilestonePayloadEssence
impl PartialEq<MilestonePayloadEssence> for MilestonePayloadEssence
sourcefn eq(&self, other: &MilestonePayloadEssence) -> bool
fn eq(&self, other: &MilestonePayloadEssence) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MilestonePayloadEssence) -> bool
fn ne(&self, other: &MilestonePayloadEssence) -> bool
This method tests for !=.
impl Eq for MilestonePayloadEssence
impl StructuralEq for MilestonePayloadEssence
impl StructuralPartialEq for MilestonePayloadEssence
Auto Trait Implementations
impl RefUnwindSafe for MilestonePayloadEssence
impl Send for MilestonePayloadEssence
impl Sync for MilestonePayloadEssence
impl Unpin for MilestonePayloadEssence
impl UnwindSafe for MilestonePayloadEssence
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