Enum olm_rs::session::OlmMessage [−][src]
An enum over the different Olm message types.
Variants
Message(Message)The normal Olm message.
PreKey(PreKeyMessage)The pre-key Olm message.
Implementations
impl OlmMessage[src]
pub fn from_type_and_ciphertext(
message_type: usize,
ciphertext: String
) -> Result<Self, ()>[src]
message_type: usize,
ciphertext: String
) -> Result<Self, ()>
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.
pub fn to_tuple(self) -> (OlmMessageType, String)[src]
Convert a OlmMessage into a tuple of the OlmMessageType and ciphertext string.
Trait Implementations
impl Clone for OlmMessage[src]
fn clone(&self) -> OlmMessage[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for OlmMessage[src]
Auto Trait Implementations
impl RefUnwindSafe for OlmMessage[src]
impl Send for OlmMessage[src]
impl Sync for OlmMessage[src]
impl Unpin for OlmMessage[src]
impl UnwindSafe for OlmMessage[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,