pub enum ClientIdentifier {
Basic(ClientId),
X509(HashMap<SignatureScheme, CertificateBundle>),
}
Expand description
Used by consumers to initializes a MLS client. Encompasses all the client types available. Could be enriched later with Verifiable Presentations.
Variants§
Implementations§
Source§impl ClientIdentifier
impl ClientIdentifier
Sourcepub fn get_id(&self) -> Result<Cow<'_, ClientId>, Error>
pub fn get_id(&self) -> Result<Cow<'_, ClientId>, Error>
Extract the unique ClientId from an identifier. Use with parsimony as, in case of a x509 certificate this leads to parsing the certificate
Sourcepub fn generate_credential_bundles(
self,
backend: &MlsCryptoProvider,
signature_schemes: HashSet<SignatureScheme>,
) -> Result<Vec<(SignatureScheme, ClientId, CredentialBundle)>, Error>
pub fn generate_credential_bundles( self, backend: &MlsCryptoProvider, signature_schemes: HashSet<SignatureScheme>, ) -> Result<Vec<(SignatureScheme, ClientId, CredentialBundle)>, Error>
Generate a new CredentialBundle (Credential + KeyPair) for each ciphersuite. This method does not persist them in the keystore !
Trait Implementations§
Source§impl Clone for ClientIdentifier
impl Clone for ClientIdentifier
Source§fn clone(&self) -> ClientIdentifier
fn clone(&self) -> ClientIdentifier
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ClientIdentifier
impl RefUnwindSafe for ClientIdentifier
impl Send for ClientIdentifier
impl Sync for ClientIdentifier
impl Unpin for ClientIdentifier
impl UnwindSafe for ClientIdentifier
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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