Struct mls_rs::identity::CustomCredential
source · 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 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 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§fn eq(&self, other: &CustomCredential) -> bool
fn eq(&self, other: &CustomCredential) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CustomCredential
impl PartialOrd for CustomCredential
source§fn partial_cmp(&self, other: &CustomCredential) -> Option<Ordering>
fn partial_cmp(&self, other: &CustomCredential) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for CustomCredential
impl StructuralEq for CustomCredential
impl StructuralPartialEq for CustomCredential
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more