pub struct Proposal<T: Codec> {
pub height: u64,
pub round: u64,
pub content: T,
pub block_hash: Hash,
pub lock: Option<PoLC>,
pub proposer: Address,
}
Expand description
A proposal
Fields
height: u64
Height of the proposal.
round: u64
Round of the proposal.
content: T
Proposal content.
block_hash: Hash
Proposal block hash.
lock: Option<PoLC>
Optional field. If the proposal has a PoLC, this contains the lock round and lock votes.
proposer: Address
Proposer address.
Trait Implementations
sourceimpl<T: Codec> Decodable for Proposal<T>
impl<T: Codec> Decodable for Proposal<T>
sourcefn decode(r: &Rlp<'_>) -> Result<Self, DecoderError>
fn decode(r: &Rlp<'_>) -> Result<Self, DecoderError>
Decode a value from RLP bytes
impl<T: Eq + Codec> Eq for Proposal<T>
impl<T: Codec> StructuralEq for Proposal<T>
impl<T: Codec> StructuralPartialEq for Proposal<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Proposal<T> where
T: RefUnwindSafe,
impl<T> Send for Proposal<T>
impl<T> Sync for Proposal<T> where
T: Sync,
impl<T> Unpin for Proposal<T> where
T: Unpin,
impl<T> UnwindSafe for Proposal<T> where
T: UnwindSafe,
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