Struct chain_impl_mockchain::certificate::vote_cast::VoteCast
source · pub struct VoteCast {
vote_plan: VotePlanId,
proposal_index: u8,
payload: Payload,
}
Fields§
§vote_plan: VotePlanId
§proposal_index: u8
§payload: Payload
Implementations§
source§impl VoteCast
impl VoteCast
pub fn new(vote_plan: VotePlanId, proposal_index: u8, payload: Payload) -> Self
pub fn vote_plan(&self) -> &VotePlanId
pub fn proposal_index(&self) -> u8
pub fn payload(&self) -> &Payload
pub(crate) fn into_payload(self) -> Payload
pub fn serialize_in(&self, bb: ByteBuilder<Self>) -> ByteBuilder<Self>
pub fn serialize(&self) -> ByteArray<Self>
Trait Implementations§
source§impl DeserializeFromSlice for VoteCast
impl DeserializeFromSlice for VoteCast
fn deserialize_from_slice(codec: &mut Codec<&[u8]>) -> Result<Self, ReadError>
fn deserialize_validate_from_slice( codec: &mut Codec<&[u8]> ) -> Result<(), ReadError>
source§impl From<VoteCast> for Certificate
impl From<VoteCast> for Certificate
source§impl PartialEq<VoteCast> for VoteCast
impl PartialEq<VoteCast> for VoteCast
source§impl Payload for VoteCast
impl Payload for VoteCast
const HAS_DATA: bool = true
const HAS_AUTH: bool = false
type Auth = ()
fn payload_data(&self) -> PayloadData<Self>
fn payload_auth_data(_: &Self::Auth) -> PayloadAuthData<Self>
fn payload_to_certificate_slice( p: PayloadSlice<'_, Self> ) -> Option<CertificateSlice<'_>>
source§impl Serialize for VoteCast
impl Serialize for VoteCast
impl Eq for VoteCast
impl StructuralEq for VoteCast
impl StructuralPartialEq for VoteCast
Auto Trait Implementations§
impl RefUnwindSafe for VoteCast
impl Send for VoteCast
impl Sync for VoteCast
impl Unpin for VoteCast
impl UnwindSafe for VoteCast
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