Enum olm_rs::session::OlmMessage[][src]

pub enum OlmMessage {
    Message(Message),
    PreKey(PreKeyMessage),
}
Expand description

An enum over the different Olm message types.

Variants

Message

The normal Olm message.

Tuple Fields of Message

0: Message
PreKey

The pre-key Olm message.

Tuple Fields of PreKey

0: PreKeyMessage

Implementations

Create an OlmMessage from a message type and the ciphertext.

Arguments

  • message_type - The type of the Olm message, 0 for a pre-key message, 1 for a normal one.

  • ciphertext - The encrypted ciphertext of the message.

Convert a OlmMessage into a tuple of the OlmMessageType and ciphertext string.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.