Struct x509_certificate::rfc5280::Extension
source · pub struct Extension {
pub id: Oid,
pub critical: Option<bool>,
pub value: OctetString,
}
Expand description
Extension.
Extension ::= SEQUENCE {
extnID OBJECT IDENTIFIER,
critical BOOLEAN DEFAULT FALSE,
extnValue OCTET STRING
-- contains the DER encoding of an ASN.1 value
-- corresponding to the extension type identified
-- by extnID
}
Fields§
§id: Oid
§critical: Option<bool>
§value: OctetString
Implementations§
source§impl Extension
impl Extension
pub fn take_opt_from<S: Source>( cons: &mut Constructed<'_, S> ) -> Result<Option<Self>, DecodeError<S::Error>>
pub fn take_from<S: Source>( cons: &mut Constructed<'_, S> ) -> Result<Self, DecodeError<S::Error>>
pub fn encode_ref(&self) -> impl Values + '_
sourcepub fn try_decode_sequence_single_oid(&self) -> Option<Oid>
pub fn try_decode_sequence_single_oid(&self) -> Option<Oid>
Attempt to decode a single OID present in an outer sequence.
If this works, we return Some. Else None.
Trait Implementations§
source§impl PartialEq for Extension
impl PartialEq for Extension
source§impl Values for Extension
impl Values for Extension
source§fn encoded_len(&self, mode: Mode) -> usize
fn encoded_len(&self, mode: Mode) -> usize
Returns the length of the encoded values for the given mode.
source§fn write_encoded<W: Write>(
&self,
mode: Mode,
target: &mut W
) -> Result<(), Error>
fn write_encoded<W: Write>( &self, mode: Mode, target: &mut W ) -> Result<(), Error>
Encodes the values in the given mode and writes them to
target
.source§fn explicit(self, tag: Tag) -> Constructed<Self>where
Self: Sized,
fn explicit(self, tag: Tag) -> Constructed<Self>where Self: Sized,
Converts the encoder into one with an explicit tag.
source§fn to_captured(&self, mode: Mode) -> Captured
fn to_captured(&self, mode: Mode) -> Captured
Captures the encoded values in the given mode.
impl Eq for Extension
impl StructuralEq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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