pub struct CustomProposal { /* private fields */ }
Expand description
A user defined custom proposal.
User defined proposals are passed through the protocol as an opaque value.
Implementations§
Source§impl CustomProposal
impl CustomProposal
Sourcepub fn new(proposal_type: ProposalType, data: Vec<u8>) -> Self
pub fn new(proposal_type: ProposalType, data: Vec<u8>) -> Self
Create a custom proposal.
§Warning
Avoid using the ProposalType
values that have constants already
defined by this crate. Using existing constants in a custom proposal
has unspecified behavior.
Sourcepub fn proposal_type(&self) -> ProposalType
pub fn proposal_type(&self) -> ProposalType
The proposal type used for this custom proposal.
Trait Implementations§
Source§impl Clone for CustomProposal
impl Clone for CustomProposal
Source§fn clone(&self) -> CustomProposal
fn clone(&self) -> CustomProposal
Returns a duplicate 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 CustomProposal
impl Debug for CustomProposal
Source§impl<'a> From<&'a CustomProposal> for BorrowedProposal<'a>
impl<'a> From<&'a CustomProposal> for BorrowedProposal<'a>
Source§fn from(p: &'a CustomProposal) -> Self
fn from(p: &'a CustomProposal) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CustomProposal
impl PartialEq for CustomProposal
impl Eq for CustomProposal
impl StructuralPartialEq for CustomProposal
Auto Trait Implementations§
impl Freeze for CustomProposal
impl RefUnwindSafe for CustomProposal
impl Send for CustomProposal
impl Sync for CustomProposal
impl Unpin for CustomProposal
impl UnwindSafe for CustomProposal
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more