pub fn new(
        device_id: Arc<DeviceIdBox>,
        identity_keys: Arc<IdentityKeys>,
        room_id: &RoomId,
        settings: EncryptionSettings,
    ) -> Self {
        let session = OlmOutboundGroupSession::new();
        let session_id = session.session_id();

        OutboundGroupSession {
            inner: Arc::new(Mutex::new(session)),
            room_id: Arc::new(room_id.to_owned()),
            device_id,
            account_identity_keys: identity_keys,
            session_id: Arc::new(session_id),
            creation_time: Arc::new(Instant::now()),
            message_count: Arc::new(AtomicU64::new(0)),
            shared: Arc::new(AtomicBool::new(false)),
            invalidated: Arc::new(AtomicBool::new(false)),
            settings: Arc::new(settings),
            shared_with_set: Arc::new(DashMap::new()),
            to_share_with_set: Arc::new(DashMap::new()),
        }
    }
/// Create a new outbound group session for the given room.
///
/// Outbound group sessions are used to encrypt room messages.
///
/// # Arguments
///
/// * `device_id` - The id of the device that created this session.
///
/// * `identity_keys` - The identity keys of the account that created this
/// session.
///
/// * `room_id` - The id of the room that the session is used in.
///
/// * `settings` - Settings determining the algorithm and rotation period of
/// the outbound group session.
Create a new outbound group session for the given room.
Outbound group sessions are used to encrypt room messages.
Create a new outbound group session for the given room . Outbound group sessions are used to encrypt room messages .
pub fn new(
        device_id: Arc<DeviceIdBox>,
        identity_keys: Arc<IdentityKeys>,
        room_id: &RoomId,
        settings: EncryptionSettings,
    ) -> Self {
        let session = OlmOutboundGroupSession::new();
        let session_id = session.session_id();
        OutboundGroupSession {
            inner: Arc::new(Mutex::new(session)),
            room_id: Arc::new(room_id.to_owned()),
            device_id,
            account_identity_keys: identity_keys,
            session_id: Arc::new(session_id),
            creation_time: Arc::new(Instant::now()),
            message_count: Arc::new(AtomicU64::new(0)),
            shared: Arc::new(AtomicBool::new(false)),
            invalidated: Arc::new(AtomicBool::new(false)),
            settings: Arc::new(settings),
            shared_with_set: Arc::new(DashMap::new()),
            to_share_with_set: Arc::new(DashMap::new()),
        }
    }
pub fn new ( device_id : Arc < DeviceIdBox > , identity_keys : Arc < IdentityKeys > , room_id : & RoomId , settings : EncryptionSettings , ) -> Self { let session = OlmOutboundGroupSession :: new ( ) ; let session_id = session . session_id ( ) ; OutboundGroupSession { inner : Arc :: new ( Mutex :: new ( session ) ) , room_id : Arc :: new ( room_id . to_owned ( ) ) , device_id , account_identity_keys : identity_keys , session_id : Arc :: new ( session_id ) , creation_time : Arc :: new ( Instant :: now ( ) ) , message_count : Arc :: new ( AtomicU64 :: new ( 0 ) ) , shared : Arc :: new ( AtomicBool :: new ( false ) ) , invalidated : Arc :: new ( AtomicBool :: new ( false ) ) , settings : Arc :: new ( settings ) , shared_with_set : Arc :: new ( DashMap :: new ( ) ) , to_share_with_set : Arc :: new ( DashMap :: new ( ) ) , } }
Create a new outbound group session for the given room.
Create a new outbound group session for the given room .
device_id
Arc<DeviceIdBox>
identity_keys
Arc<IdentityKeys>
room_id
&RoomId
settings
EncryptionSettings
device_id
Arc<DeviceIdBox>
identity_keys
Arc<IdentityKeys>
room_id
&RoomId
settings
EncryptionSettings