[][src]Struct matrix_sdk_crypto::olm::InboundGroupSession

pub struct InboundGroupSession { /* fields omitted */ }

Inbound group session.

Inbound group sessions are used to exchange room messages between a group of participants. Inbound group sessions are used to decrypt the room messages.

Implementations

impl InboundGroupSession[src]

pub fn from_export(
    exported_session: impl Into<ExportedRoomKey>
) -> Result<Self, OlmGroupSessionError>
[src]

Create a InboundGroupSession from an exported version of the group session.

Most notably this can be called with an ExportedRoomKey from a previous export() call.

pub async fn pickle(
    &self,
    pickle_mode: PicklingMode
) -> PickledInboundGroupSession
[src]

Store the group session as a base64 encoded string.

Arguments

  • pickle_mode - The mode that was used to pickle the group session, either an unencrypted mode or an encrypted using passphrase.

pub async fn export(&self) -> ExportedRoomKey[src]

Export this session at the first known message index.

If only a limited part of this session should be exported use export_at_index().

pub async fn export_at_index(
    &self,
    message_index: u32
) -> Option<ExportedRoomKey>
[src]

Export this session at the given message index.

pub fn from_pickle(
    pickle: PickledInboundGroupSession,
    pickle_mode: PicklingMode
) -> Result<Self, OlmGroupSessionError>
[src]

Restore a Session from a previously pickled string.

Returns the restored group session or a OlmGroupSessionError if there was an error.

Arguments

  • pickle - The pickled version of the InboundGroupSession.

  • pickle_mode - The mode that was used to pickle the session, either an unencrypted mode or an encrypted using passphrase.

pub fn room_id(&self) -> &RoomId[src]

The room where this session is used in.

pub fn session_id(&self) -> &str[src]

Returns the unique identifier for this session.

pub fn first_known_index(&self) -> u32[src]

Get the first message index we know how to decrypt.

Trait Implementations

impl Clone for InboundGroupSession[src]

impl Debug for InboundGroupSession[src]

impl PartialEq<InboundGroupSession> for InboundGroupSession[src]

impl TryFrom<ExportedRoomKey> for InboundGroupSession[src]

type Error = OlmGroupSessionError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsyncTraitDeps for T where
    T: Send + Sync + Debug
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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