Skip to main content

DecryptedMessage

Enum DecryptedMessage 

Source
pub enum DecryptedMessage {
    ApplicationMessage(DecryptedBytes),
    Commit(Commit),
    Proposal(Proposal),
    Transient(DecryptedBytes),
    TransientTargeted(DecryptedBytes),
    PersistedTargeted(DecryptedBytes),
}
Expand description

Represents the items a consumer might require after decrypting a message.

Variants§

§

ApplicationMessage(DecryptedBytes)

The decrypted message is an MLS application message.

§

Commit(Commit)

The decrypted message is a commit.

§

Proposal(Proposal)

The decrypted message is a proposal.

§

Transient(DecryptedBytes)

The decrypted message is a transient targeted message.

§

TransientTargeted(DecryptedBytes)

The decrypted message is a transient targeted message.

§

PersistedTargeted(DecryptedBytes)

The decrypted message is a persisted targeted message.

Implementations§

Source§

impl DecryptedMessage

Source

pub fn is_application_message(&self) -> bool

Returns true if this is a DecryptedMessage::ApplicationMessage, otherwise false

Source

pub fn as_application_message_mut(&mut self) -> Option<&mut DecryptedBytes>

Optionally returns mutable references to the inner fields if this is a DecryptedMessage::ApplicationMessage, otherwise None

Source

pub fn as_application_message(&self) -> Option<&DecryptedBytes>

Optionally returns references to the inner fields if this is a DecryptedMessage::ApplicationMessage, otherwise None

Source

pub fn into_application_message(self) -> Result<DecryptedBytes, Self>

Returns the inner fields if this is a DecryptedMessage::ApplicationMessage, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_application_message_unchecked(self) -> DecryptedBytes

Unchecked return of the inner fields of DecryptedMessage::ApplicationMessage.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_application_message_unchecked(&self) -> &DecryptedBytes

Unchecked reference of the inner fields of DecryptedMessage::ApplicationMessage.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_application_message_mut_unchecked( &mut self, ) -> &mut DecryptedBytes

Unchecked mutable reference of the inner fields of DecryptedMessage::ApplicationMessage.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_commit(&self) -> bool

Returns true if this is a DecryptedMessage::Commit, otherwise false

Source

pub fn as_commit_mut(&mut self) -> Option<&mut Commit>

Optionally returns mutable references to the inner fields if this is a DecryptedMessage::Commit, otherwise None

Source

pub fn as_commit(&self) -> Option<&Commit>

Optionally returns references to the inner fields if this is a DecryptedMessage::Commit, otherwise None

Source

pub fn into_commit(self) -> Result<Commit, Self>

Returns the inner fields if this is a DecryptedMessage::Commit, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_commit_unchecked(self) -> Commit

Unchecked return of the inner fields of DecryptedMessage::Commit.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_commit_unchecked(&self) -> &Commit

Unchecked reference of the inner fields of DecryptedMessage::Commit.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_commit_mut_unchecked(&mut self) -> &mut Commit

Unchecked mutable reference of the inner fields of DecryptedMessage::Commit.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_proposal(&self) -> bool

Returns true if this is a DecryptedMessage::Proposal, otherwise false

Source

pub fn as_proposal_mut(&mut self) -> Option<&mut Proposal>

Optionally returns mutable references to the inner fields if this is a DecryptedMessage::Proposal, otherwise None

Source

pub fn as_proposal(&self) -> Option<&Proposal>

Optionally returns references to the inner fields if this is a DecryptedMessage::Proposal, otherwise None

Source

pub fn into_proposal(self) -> Result<Proposal, Self>

Returns the inner fields if this is a DecryptedMessage::Proposal, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_proposal_unchecked(self) -> Proposal

Unchecked return of the inner fields of DecryptedMessage::Proposal.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_proposal_unchecked(&self) -> &Proposal

Unchecked reference of the inner fields of DecryptedMessage::Proposal.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_proposal_mut_unchecked(&mut self) -> &mut Proposal

Unchecked mutable reference of the inner fields of DecryptedMessage::Proposal.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_transient(&self) -> bool

Returns true if this is a DecryptedMessage::Transient, otherwise false

Source

pub fn as_transient_mut(&mut self) -> Option<&mut DecryptedBytes>

Optionally returns mutable references to the inner fields if this is a DecryptedMessage::Transient, otherwise None

Source

pub fn as_transient(&self) -> Option<&DecryptedBytes>

Optionally returns references to the inner fields if this is a DecryptedMessage::Transient, otherwise None

Source

pub fn into_transient(self) -> Result<DecryptedBytes, Self>

Returns the inner fields if this is a DecryptedMessage::Transient, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_transient_unchecked(self) -> DecryptedBytes

Unchecked return of the inner fields of DecryptedMessage::Transient.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_transient_unchecked(&self) -> &DecryptedBytes

Unchecked reference of the inner fields of DecryptedMessage::Transient.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_transient_mut_unchecked(&mut self) -> &mut DecryptedBytes

Unchecked mutable reference of the inner fields of DecryptedMessage::Transient.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_transient_targeted(&self) -> bool

Returns true if this is a DecryptedMessage::TransientTargeted, otherwise false

Source

pub fn as_transient_targeted_mut(&mut self) -> Option<&mut DecryptedBytes>

Optionally returns mutable references to the inner fields if this is a DecryptedMessage::TransientTargeted, otherwise None

Source

pub fn as_transient_targeted(&self) -> Option<&DecryptedBytes>

Optionally returns references to the inner fields if this is a DecryptedMessage::TransientTargeted, otherwise None

Source

pub fn into_transient_targeted(self) -> Result<DecryptedBytes, Self>

Returns the inner fields if this is a DecryptedMessage::TransientTargeted, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_transient_targeted_unchecked(self) -> DecryptedBytes

Unchecked return of the inner fields of DecryptedMessage::TransientTargeted.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_transient_targeted_unchecked(&self) -> &DecryptedBytes

Unchecked reference of the inner fields of DecryptedMessage::TransientTargeted.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_transient_targeted_mut_unchecked( &mut self, ) -> &mut DecryptedBytes

Unchecked mutable reference of the inner fields of DecryptedMessage::TransientTargeted.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_persisted_targeted(&self) -> bool

Returns true if this is a DecryptedMessage::PersistedTargeted, otherwise false

Source

pub fn as_persisted_targeted_mut(&mut self) -> Option<&mut DecryptedBytes>

Optionally returns mutable references to the inner fields if this is a DecryptedMessage::PersistedTargeted, otherwise None

Source

pub fn as_persisted_targeted(&self) -> Option<&DecryptedBytes>

Optionally returns references to the inner fields if this is a DecryptedMessage::PersistedTargeted, otherwise None

Source

pub fn into_persisted_targeted(self) -> Result<DecryptedBytes, Self>

Returns the inner fields if this is a DecryptedMessage::PersistedTargeted, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_persisted_targeted_unchecked(self) -> DecryptedBytes

Unchecked return of the inner fields of DecryptedMessage::PersistedTargeted.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_persisted_targeted_unchecked(&self) -> &DecryptedBytes

Unchecked reference of the inner fields of DecryptedMessage::PersistedTargeted.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_persisted_targeted_mut_unchecked( &mut self, ) -> &mut DecryptedBytes

Unchecked mutable reference of the inner fields of DecryptedMessage::PersistedTargeted.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source§

impl DecryptedMessage

Source

pub fn identity(&self) -> &WireIdentity

Identity claims present in the sender credential

Trait Implementations§

Source§

impl Debug for DecryptedMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<BufferedDecryptedMessage> for DecryptedMessage

Source§

fn from(value: BufferedDecryptedMessage) -> Self

Converts to this type from the input type.
Source§

impl From<DecryptedMessage> for BufferedDecryptedMessage

Source§

fn from(value: DecryptedMessage) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> MaybeSendSync for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V