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) -> CryptoResult<Cow<'_, ClientId>>
pub fn get_id(&self) -> CryptoResult<Cow<'_, ClientId>>
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>,
) -> CryptoResult<Vec<(SignatureScheme, ClientId, CredentialBundle)>>
pub fn generate_credential_bundles( self, backend: &MlsCryptoProvider, signature_schemes: HashSet<SignatureScheme>, ) -> CryptoResult<Vec<(SignatureScheme, ClientId, CredentialBundle)>>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moresource§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