Skip to main content

Clearance

Struct Clearance 

Source
pub struct Clearance<'a> {
    pub element: Element<'a>,
    pub syntax: Syntax,
    pub policy: Oid<'a>,
    pub policy_element: Element<'a>,
    pub classes: Option<BitString<'a>>,
    pub classes_element: Option<Element<'a>>,
    pub categories_element: Option<Element<'a>>,
    pub categories: OwnedVec<SecurityCategory<'a>>,
}
Expand description

Complete original clearance. Absence of classList means unclassified; absence of securityCategories differs from a present empty SET.

Fields§

§element: Element<'a>

Original whole SEQUENCE.

§syntax: Syntax

Original field-tag convention, not a policy choice.

§policy: Oid<'a>

Security policy identifier, not a trust assertion.

§policy_element: Element<'a>

Original policy identifier field.

§classes: Option<BitString<'a>>

Original named bits, including policy-defined positions beyond bit5.

§classes_element: Option<Element<'a>>

Original classList field, absent for the schema default.

§categories_element: Option<Element<'a>>

Original categories SET, absent independently of its cardinality.

§categories: OwnedVec<SecurityCategory<'a>>

Categories in original SET order, with retained capacity accounting.

Implementations§

Source§

impl<'a> Clearance<'a>

Source

pub fn read(parent: &mut ScopedReader<'a, '_>) -> Result<Self>

Reads exactly one complete current or deprecated clearance syntax.

Source

pub fn read_element( parent: &ScopedReader<'a, '_>, element: &Element<'a>, ) -> Result<Self>

Reads original DER fields without retagging or resetting source limits.

Source

pub fn read_attribute<W: Work>( attribute: &Attribute<'a>, work: &W, ) -> Result<OwnedVec<Self>>

Reads every registered value. Current OID forbids historical tagging; historical OID supports both original and corrected syntax (§4.4.6).

Source

pub fn has_class(&self, position: u64) -> bool

Effective bit, including the unclassified default when classList is absent. O(1) metadata access; no security-policy ranking is inferred.

Trait Implementations§

Source§

impl<'a> Debug for Clearance<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for Clearance<'a>

§

impl<'a> !RefUnwindSafe for Clearance<'a>

§

impl<'a> !Send for Clearance<'a>

§

impl<'a> !Sync for Clearance<'a>

§

impl<'a> !UnwindSafe for Clearance<'a>

§

impl<'a> Unpin for Clearance<'a>

§

impl<'a> UnsafeUnpin for Clearance<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.