pub struct CustomCredential {
pub credential_type: CredentialType,
pub data: Vec<u8>,
}
Expand description
Custom user created credential type.
§Warning
In order to use a custom credential within an MLS group, a supporting
IdentityProvider
must be created that can
authenticate the credential.
Fields§
§credential_type: CredentialType
Unique credential type to identify this custom credential.
data: Vec<u8>
Opaque data representing this custom credential.
Implementations§
Source§impl CustomCredential
impl CustomCredential
Sourcepub fn new(credential_type: CredentialType, data: Vec<u8>) -> CustomCredential
pub fn new(credential_type: CredentialType, data: Vec<u8>) -> CustomCredential
Create a new custom credential with opaque data.
§Warning
Using any of the constants defined within CredentialType
will
result in unspecified behavior.
Trait Implementations§
Source§impl Clone for CustomCredential
impl Clone for CustomCredential
Source§fn clone(&self) -> CustomCredential
fn clone(&self) -> CustomCredential
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CustomCredential
impl Debug for CustomCredential
Source§impl Hash for CustomCredential
impl Hash for CustomCredential
Source§impl MlsDecode for CustomCredential
impl MlsDecode for CustomCredential
fn mls_decode(reader: &mut &[u8]) -> Result<CustomCredential, Error>
Source§impl MlsEncode for CustomCredential
impl MlsEncode for CustomCredential
Source§impl MlsSize for CustomCredential
impl MlsSize for CustomCredential
fn mls_encoded_len(&self) -> usize
Source§impl Ord for CustomCredential
impl Ord for CustomCredential
Source§fn cmp(&self, other: &CustomCredential) -> Ordering
fn cmp(&self, other: &CustomCredential) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CustomCredential
impl PartialEq for CustomCredential
Source§impl PartialOrd for CustomCredential
impl PartialOrd for CustomCredential
impl Eq for CustomCredential
impl StructuralPartialEq for CustomCredential
Auto Trait Implementations§
impl Freeze for CustomCredential
impl RefUnwindSafe for CustomCredential
impl Send for CustomCredential
impl Sync for CustomCredential
impl Unpin for CustomCredential
impl UnwindSafe for CustomCredential
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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