Struct bee_message::payload::milestone::MilestonePayloadEssence
source · pub struct MilestonePayloadEssence { /* private fields */ }Expand description
Essence of a milestone payload. This is the signed part of a milestone payload.
Implementations§
source§impl 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] ⓘ
pub fn merkle_proof(&self) -> &[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§
source§impl Clone for MilestonePayloadEssence
impl Clone for MilestonePayloadEssence
source§fn clone(&self) -> MilestonePayloadEssence
fn clone(&self) -> MilestonePayloadEssence
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 MilestonePayloadEssence
impl Debug for MilestonePayloadEssence
source§impl Packable for MilestonePayloadEssence
impl Packable for MilestonePayloadEssence
source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
source§fn 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.
source§fn 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.
source§fn 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.
source§impl PartialEq<MilestonePayloadEssence> for MilestonePayloadEssence
impl PartialEq<MilestonePayloadEssence> for MilestonePayloadEssence
source§fn 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 ==.