pub struct BasicCredential {
    pub identifier: Vec<u8>,
}Expand description
Bare assertion of an identity without any additional information.
The format of the encoded identity is defined by the application.
§Warning
Basic credentials are inherently insecure since they can not be
properly validated. It is not recommended to use BasicCredential
in production applications.
Fields§
§identifier: Vec<u8>Underlying identifier as raw bytes.
Implementations§
Source§impl BasicCredential
 
impl BasicCredential
Sourcepub fn new(identifier: Vec<u8>) -> BasicCredential
 
pub fn new(identifier: Vec<u8>) -> BasicCredential
Create a new basic credential with raw bytes.
Source§impl BasicCredential
 
impl BasicCredential
pub fn credential_type() -> CredentialType
pub fn into_credential(self) -> Credential
Trait Implementations§
Source§impl Clone for BasicCredential
 
impl Clone for BasicCredential
Source§fn clone(&self) -> BasicCredential
 
fn clone(&self) -> BasicCredential
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 BasicCredential
 
impl Debug for BasicCredential
Source§impl Hash for BasicCredential
 
impl Hash for BasicCredential
Source§impl MlsCredential for BasicCredential
 
impl MlsCredential for BasicCredential
Source§type Error = Infallible
 
type Error = Infallible
Conversion error type.
Source§fn credential_type() -> CredentialType
 
fn credential_type() -> CredentialType
Credential type represented by this type.
Source§fn into_credential(self) -> Result<Credential, Self::Error>
 
fn into_credential(self) -> Result<Credential, Self::Error>
Function to convert this type into a 
Credential enum.Source§impl MlsDecode for BasicCredential
 
impl MlsDecode for BasicCredential
Source§impl MlsEncode for BasicCredential
 
impl MlsEncode for BasicCredential
Source§impl MlsSize for BasicCredential
 
impl MlsSize for BasicCredential
fn mls_encoded_len(&self) -> usize
Source§impl Ord for BasicCredential
 
impl Ord for BasicCredential
Source§fn cmp(&self, other: &BasicCredential) -> Ordering
 
fn cmp(&self, other: &BasicCredential) -> 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 BasicCredential
 
impl PartialEq for BasicCredential
Source§impl PartialOrd for BasicCredential
 
impl PartialOrd for BasicCredential
impl Eq for BasicCredential
impl StructuralPartialEq for BasicCredential
Auto Trait Implementations§
impl Freeze for BasicCredential
impl RefUnwindSafe for BasicCredential
impl Send for BasicCredential
impl Sync for BasicCredential
impl Unpin for BasicCredential
impl UnwindSafe for BasicCredential
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