Struct tendermint::vote::CanonicalVote
source · pub struct CanonicalVote {
pub vote_type: Type,
pub height: Height,
pub round: Round,
pub block_id: Option<Id>,
pub timestamp: Option<Time>,
pub chain_id: Id,
}
Expand description
CanonicalVote is used for protobuf encoding a Vote
Fields§
§vote_type: Type
Type of vote (prevote or precommit)
height: Height
Block height
round: Round
Round
block_id: Option<Id>
Block ID
timestamp: Option<Time>
Timestamp
chain_id: Id
Chain ID
Implementations§
source§impl CanonicalVote
impl CanonicalVote
sourcepub fn new(vote: Vote, chain_id: ChainId) -> CanonicalVote
pub fn new(vote: Vote, chain_id: ChainId) -> CanonicalVote
Create CanonicalVote from Vote
Trait Implementations§
source§impl Clone for CanonicalVote
impl Clone for CanonicalVote
source§fn clone(&self) -> CanonicalVote
fn clone(&self) -> CanonicalVote
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 CanonicalVote
impl Debug for CanonicalVote
source§impl<'de> Deserialize<'de> for CanonicalVote
impl<'de> Deserialize<'de> for CanonicalVote
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<CanonicalVote> for CanonicalVote
impl From<CanonicalVote> for CanonicalVote
source§fn from(value: CanonicalVote) -> Self
fn from(value: CanonicalVote) -> Self
Converts to this type from the input type.
source§impl From<CanonicalVote> for CanonicalVote
impl From<CanonicalVote> for CanonicalVote
source§fn from(value: CanonicalVote) -> Self
fn from(value: CanonicalVote) -> Self
Converts to this type from the input type.
source§impl From<CanonicalVote> for CanonicalVote
impl From<CanonicalVote> for CanonicalVote
source§fn from(value: CanonicalVote) -> Self
fn from(value: CanonicalVote) -> Self
Converts to this type from the input type.
source§impl PartialEq for CanonicalVote
impl PartialEq for CanonicalVote
source§fn eq(&self, other: &CanonicalVote) -> bool
fn eq(&self, other: &CanonicalVote) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Protobuf<CanonicalVote> for CanonicalVote
impl Protobuf<CanonicalVote> for CanonicalVote
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode a length-delimited instance from
the buffer. Read more
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8>
(or equivalent).source§impl Protobuf<CanonicalVote> for CanonicalVote
impl Protobuf<CanonicalVote> for CanonicalVote
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode a length-delimited instance from
the buffer. Read more
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8>
(or equivalent).source§impl Protobuf<CanonicalVote> for CanonicalVote
impl Protobuf<CanonicalVote> for CanonicalVote
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode with a length-delimiter to a buffer in Protobuf format. Read more
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode a length-delimited instance from
the buffer. Read more
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8>
(or equivalent).source§impl Serialize for CanonicalVote
impl Serialize for CanonicalVote
source§impl TryFrom<CanonicalVote> for CanonicalVote
impl TryFrom<CanonicalVote> for CanonicalVote
source§impl TryFrom<CanonicalVote> for CanonicalVote
impl TryFrom<CanonicalVote> for CanonicalVote
source§impl TryFrom<CanonicalVote> for CanonicalVote
impl TryFrom<CanonicalVote> for CanonicalVote
impl Eq for CanonicalVote
impl StructuralPartialEq for CanonicalVote
Auto Trait Implementations§
impl Freeze for CanonicalVote
impl RefUnwindSafe for CanonicalVote
impl Send for CanonicalVote
impl Sync for CanonicalVote
impl Unpin for CanonicalVote
impl UnwindSafe for CanonicalVote
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