pub enum HotStuffMessage {
Proposal(Proposal),
Nudge(Nudge),
PhaseVote(PhaseVote),
NewView(NewView),
}
Expand description
Every kind of message sent between replicas as part of the HotStuff subprotocol.
Variants§
Proposal(Proposal)
See Proposal
.
Nudge(Nudge)
See Nudge
.
PhaseVote(PhaseVote)
See PhaseVote
.
NewView(NewView)
See NewView
.
Implementations§
source§impl HotStuffMessage
impl HotStuffMessage
sourcepub fn view(&self) -> ViewNumber
pub fn view(&self) -> ViewNumber
Get the view number associated with a given HotStuffMessage
.
sourcepub fn size(&self) -> u64
pub fn size(&self) -> u64
Returns the number of bytes required to store a given instance of the HotStuffMessage
enum.
Trait Implementations§
source§impl BorshDeserialize for HotStuffMessage
impl BorshDeserialize for HotStuffMessage
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for HotStuffMessage
impl BorshSerialize for HotStuffMessage
source§impl Cacheable for HotStuffMessage
impl Cacheable for HotStuffMessage
source§impl Clone for HotStuffMessage
impl Clone for HotStuffMessage
source§fn clone(&self) -> HotStuffMessage
fn clone(&self) -> HotStuffMessage
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 EnumExt for HotStuffMessage
impl EnumExt for HotStuffMessage
source§impl From<HotStuffMessage> for Message
impl From<HotStuffMessage> for Message
source§fn from(value: HotStuffMessage) -> Self
fn from(value: HotStuffMessage) -> Self
Converts to this type from the input type.
source§impl From<NewView> for HotStuffMessage
impl From<NewView> for HotStuffMessage
source§impl From<Nudge> for HotStuffMessage
impl From<Nudge> for HotStuffMessage
source§impl From<PhaseVote> for HotStuffMessage
impl From<PhaseVote> for HotStuffMessage
source§impl From<Proposal> for HotStuffMessage
impl From<Proposal> for HotStuffMessage
source§impl Into<ProgressMessage> for HotStuffMessage
impl Into<ProgressMessage> for HotStuffMessage
source§fn into(self) -> ProgressMessage
fn into(self) -> ProgressMessage
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for HotStuffMessage
impl RefUnwindSafe for HotStuffMessage
impl Send for HotStuffMessage
impl Sync for HotStuffMessage
impl Unpin for HotStuffMessage
impl UnwindSafe for HotStuffMessage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)