pub struct SessionConfig<'a> {
pub db_connection_type: ConnectionType<'a>,
pub database_key: DatabaseKey,
pub client_id: Option<ClientId>,
pub external_entropy: Option<&'a [u8]>,
pub ciphersuites: Vec<MlsCiphersuite>,
pub nb_key_packages: Option<usize>,
}
Expand description
Fields§
§db_connection_type: ConnectionType<'a>
Connection type for the database
database_key: DatabaseKey
Database key to be used to instantiate the MlsCryptoProvider
client_id: Option<ClientId>
Identifier for the client to be used by Session
If set, this initializes the MLS session. Otherwise, the session is left uninitialized.
external_entropy: Option<&'a [u8]>
Entropy pool seed for the internal PRNG
ciphersuites: Vec<MlsCiphersuite>
All supported ciphersuites in this session
nb_key_packages: Option<usize>
Number of openmls::prelude::KeyPackage to create when creating a MLS client.
Defaults to crate::prelude::INITIAL_KEYING_MATERIAL_COUNT.
Implementations§
Source§impl<'a> SessionConfig<'a>
impl<'a> SessionConfig<'a>
Sourcepub fn builder() -> SessionConfigBuilder<'a, ((), (), (), (), (), ())>
pub fn builder() -> SessionConfigBuilder<'a, ((), (), (), (), (), ())>
Create a builder for building SessionConfig
.
On the builder, call .db_connection_type(...)
, .database_key(...)
, .client_id(...)
(optional), .external_entropy(...)
(optional), .ciphersuites(...)
(optional), .nb_key_packages(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of SessionConfig
.
Source§impl<'a> SessionConfig<'a>
impl<'a> SessionConfig<'a>
Sourcepub fn validate(self) -> Result<ValidatedSessionConfig<'a>>
pub fn validate(self) -> Result<ValidatedSessionConfig<'a>>
Validate this configuration to produce a validated configuration.
This can then be passed to Session::try_new.
Trait Implementations§
Source§impl<'a> Clone for SessionConfig<'a>
impl<'a> Clone for SessionConfig<'a>
Source§fn clone(&self) -> SessionConfig<'a>
fn clone(&self) -> SessionConfig<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for SessionConfig<'a>
impl<'a> Debug for SessionConfig<'a>
Source§impl<'a> TryFrom<SessionConfig<'a>> for ValidatedSessionConfig<'a>
impl<'a> TryFrom<SessionConfig<'a>> for ValidatedSessionConfig<'a>
Auto Trait Implementations§
impl<'a> Freeze for SessionConfig<'a>
impl<'a> RefUnwindSafe for SessionConfig<'a>
impl<'a> Send for SessionConfig<'a>
impl<'a> Sync for SessionConfig<'a>
impl<'a> Unpin for SessionConfig<'a>
impl<'a> UnwindSafe for SessionConfig<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more