Enum otrr::UserMessage

source ·
pub enum UserMessage {
    None,
    Plaintext(Vec<u8>),
    WarningUnencrypted(Vec<u8>),
    Error(Vec<u8>),
    Reset(InstanceTag),
    ConfidentialSessionStarted(InstanceTag),
    Confidential(InstanceTag, Vec<u8>, Vec<TLV>),
    ConfidentialSessionFinished(InstanceTag, Vec<u8>),
    SMPSucceeded(InstanceTag),
    SMPFailed(InstanceTag),
}
Expand description

UserMessage represents the resulting Message intended for the messaging client, possibly containing content relevant to display to the user.

Variants§

§

None

Nothing received that is relevant to report/transfer back to the messaging client.

§

Plaintext(Vec<u8>)

Message for user received over open, plaintext transport.

§

WarningUnencrypted(Vec<u8>)

While encrypted sessions are present or the policy requires encryption, a message is received in plaintext. The client must know such that it can issue a warning.

§

Error(Vec<u8>)

OTR error message received.

§

Reset(InstanceTag)

Message state reset to “plaintext”. (by user action)

§

ConfidentialSessionStarted(InstanceTag)

Confidential session started, transitioned to “encrypted” state.

§

Confidential(InstanceTag, Vec<u8>, Vec<TLV>)

Message for user received over confidential OTR transport.

§

ConfidentialSessionFinished(InstanceTag, Vec<u8>)

Confidential session ended, transitioned to “finished” state. (Session ended by other party.)

§

SMPSucceeded(InstanceTag)

SMP process succeeded, signaling the client that authenticity is verified.

§

SMPFailed(InstanceTag)

SMP process failed, signaling the client that some final concluion was reached.

Trait Implementations§

source§

impl Debug for UserMessage

source§

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

Formats the value using the given formatter. Read more

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
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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.
source§

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

source§

fn vzip(self) -> V