pub enum ProtocolMessage {
PrivateMessage(PrivateMessageIn),
PublicMessage(Box<PublicMessageIn>),
}
Expand description
Enum containing a message for use with process_message
and an
MlsGroup
. Both PublicMessage
and PrivateMessage
implement
Into<ProtocolMessage>
.
Variants§
PrivateMessage(PrivateMessageIn)
A ProtocolMessage
containing a PrivateMessage
.
PublicMessage(Box<PublicMessageIn>)
A ProtocolMessage
containing a PublicMessage
.
Implementations§
Source§impl ProtocolMessage
impl ProtocolMessage
Sourcepub fn wire_format(&self) -> WireFormat
pub fn wire_format(&self) -> WireFormat
Returns the wire format.
Sourcepub fn epoch(&self) -> GroupEpoch
pub fn epoch(&self) -> GroupEpoch
Returns the epoch.
Sourcepub fn content_type(&self) -> ContentType
pub fn content_type(&self) -> ContentType
Returns the content type.
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Returns true
if this is either an external proposal or external commit
Sourcepub fn is_handshake_message(&self) -> bool
pub fn is_handshake_message(&self) -> bool
Returns true
if this is a handshake message and false
otherwise.
Trait Implementations§
Source§impl Clone for ProtocolMessage
impl Clone for ProtocolMessage
Source§fn clone(&self) -> ProtocolMessage
fn clone(&self) -> ProtocolMessage
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 ProtocolMessage
impl Debug for ProtocolMessage
Source§impl From<PrivateMessageIn> for ProtocolMessage
impl From<PrivateMessageIn> for ProtocolMessage
Source§fn from(private_message: PrivateMessageIn) -> Self
fn from(private_message: PrivateMessageIn) -> Self
Converts to this type from the input type.
Source§impl From<PublicMessageIn> for ProtocolMessage
impl From<PublicMessageIn> for ProtocolMessage
Source§fn from(public_message: PublicMessageIn) -> Self
fn from(public_message: PublicMessageIn) -> Self
Converts to this type from the input type.
Source§impl TryFrom<MlsMessageIn> for ProtocolMessage
impl TryFrom<MlsMessageIn> for ProtocolMessage
Source§type Error = ProtocolMessageError
type Error = ProtocolMessageError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ProtocolMessage
impl RefUnwindSafe for ProtocolMessage
impl Send for ProtocolMessage
impl Sync for ProtocolMessage
impl Unpin for ProtocolMessage
impl UnwindSafe for ProtocolMessage
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<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