Struct mls_rs::group::proposal::CustomProposal
source · 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 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 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
source§fn eq(&self, other: &CustomProposal) -> bool
fn eq(&self, other: &CustomProposal) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CustomProposal
impl StructuralEq for CustomProposal
impl StructuralPartialEq for CustomProposal
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more