Struct CertificateRequestExtensions

Source
#[non_exhaustive]
pub(crate) struct CertificateRequestExtensions { pub(crate) signature_algorithms: Option<Vec<SignatureScheme>>, pub(crate) authority_names: Option<Vec<DistinguishedName>>, pub(crate) certificate_compression_algorithms: Option<Vec<CertificateCompressionAlgorithm>>, }

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§signature_algorithms: Option<Vec<SignatureScheme>>§authority_names: Option<Vec<DistinguishedName>>§certificate_compression_algorithms: Option<Vec<CertificateCompressionAlgorithm>>

Implementations§

Source§

impl<'a> CertificateRequestExtensions

Source

const ALL_EXTENSIONS: &'static [ExtensionType]

Every ExtensionType this structure may encode/decode.

Source

fn read_one( &mut self, r: &mut Reader<'a>, unknown: impl FnMut(ExtensionType) -> Result<(), InvalidMessage>, ) -> Result<ExtensionType, InvalidMessage>

Reads one extension typ, length and body from r.

Unhandled extensions (according to read_extension_body() are inserted into unknown_extensions)

Source

fn read_extension_body( &mut self, typ: ExtensionType, r: &mut Reader<'a>, ) -> Result<bool, InvalidMessage>

Reads one extension body for an extension named by typ.

Returns true if handled, false otherwise.

r is fully consumed if typ is unhandled.

Source

fn read_once<T>( r: &mut Reader<'a>, id: ExtensionType, out: &mut Option<T>, ) -> Result<(), InvalidMessage>
where T: Codec<'a>,

Decode r as T into out, only if out is None.

Source

fn encode_one(&self, typ: ExtensionType, output: &mut Vec<u8>)

Encode one extension body for typ into output.

Adds nothing to output if typ is absent from this struct, either because it is None or unhandled by this struct.

Source

pub(crate) fn collect_used(&self) -> Vec<ExtensionType>

Return a list of extensions whose items are Some

Source

pub(crate) fn clone_one(&mut self, source: &Self, typ: ExtensionType)

Clone the value of the extension identified by typ from source to self.

Does nothing if typ is not an extension handled by this object.

Source

pub(crate) fn clear(&mut self, typ: ExtensionType)

Remove the extension identified by typ from self.

Source

pub(crate) fn only_contains(&self, allowed: &[ExtensionType]) -> bool

Return true if all present extensions are named in allowed

Source

pub(crate) fn contains_any(&self, exts: &[ExtensionType]) -> bool

Return true if any extension named in exts is present.

Source

fn contains(&self, e: ExtensionType) -> bool

Trait Implementations§

Source§

impl Clone for CertificateRequestExtensions

Source§

fn clone(&self) -> CertificateRequestExtensions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Codec<'_> for CertificateRequestExtensions

Source§

fn encode(&self, bytes: &mut Vec<u8>)

Function for encoding itself by appending itself to the provided vec of bytes.
Source§

fn read(r: &mut Reader<'_>) -> Result<Self, InvalidMessage>

Function for decoding itself from the provided reader will return Some if the decoding was successful or None if it was not.
Source§

fn get_encoding(&self) -> Vec<u8>

Convenience function for encoding the implementation into a vec and returning it
Source§

fn read_bytes(bytes: &'a [u8]) -> Result<Self, InvalidMessage>

Function for wrapping a call to the read function in a Reader for the slice of bytes provided Read more
Source§

impl<'a> Debug for CertificateRequestExtensions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CertificateRequestExtensions

Source§

fn default() -> CertificateRequestExtensions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.