Enum olm_rs::session::OlmMessage [−][src]
pub enum OlmMessage {
Message(Message),
PreKey(PreKeyMessage),
}Expand description
An enum over the different Olm message types.
Variants
The normal Olm message.
Tuple Fields of Message
0: MessageThe pre-key Olm message.
Tuple Fields of PreKey
Implementations
pub fn from_type_and_ciphertext(
message_type: usize,
ciphertext: String
) -> Result<Self, UnknownOlmMessageType>
pub fn from_type_and_ciphertext(
message_type: usize,
ciphertext: String
) -> Result<Self, UnknownOlmMessageType>
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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for OlmMessage
impl Send for OlmMessage
impl Sync for OlmMessage
impl Unpin for OlmMessage
impl UnwindSafe for OlmMessage
Blanket Implementations
Mutably borrows from an owned value. Read more