Skip to main content

AccessRightsDecision

Enum AccessRightsDecision 

Source
#[non_exhaustive]
pub enum AccessRightsDecision { Exempt,
#[non_exhaustive]
Granted { rule: AccessRulePosition, },
#[non_exhaustive]
Denied { access_event: AccessEvent, rule: Option<AccessRulePosition>, }, }
Expand description

The outcome of the Access Rights check (Clause 12.34.9.2).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Exempt

The credential’s Authorization_Exemptions lists ACCESS_RIGHTS, so the check didn’t run and counts as passed (Clause 12.35.25).

§

#[non_exhaustive]
Granted

No negative rule held, and this positive rule did: the first in gathering and array order.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§rule: AccessRulePosition

The positive rule that granted access.

§

#[non_exhaustive]
Denied

The check failed.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§access_event: AccessEvent

The Access_Event value Clause 12.34.9.2 gives this failure: DENIED_POINT_NO_ACCESS_RIGHTS or DENIED_ZONE_NO_ACCESS_RIGHTS for a negative rule, DENIED_OUT_OF_TIME_RANGE, or DENIED_NO_ACCESS_RIGHTS. The evaluator doesn’t write it.

§rule: Option<AccessRulePosition>

The rule behind the denial: the negative rule that held, or, for DENIED_OUT_OF_TIME_RANGE, the first positive rule that covered the point while a value read for its time range was FALSE. None for DENIED_NO_ACCESS_RIGHTS.

Implementations§

Source§

impl AccessRightsDecision

Source

pub fn allows(&self) -> bool

Whether the check let the credential through: granted or exempt.

Source

pub fn access_event(&self) -> Option<AccessEvent>

The Access_Event value of a denial, None otherwise.

Source

pub fn rule(&self) -> Option<AccessRulePosition>

The rule the decision names: the granting rule, or a denial’s rule when it has one.

Trait Implementations§

Source§

impl Clone for AccessRightsDecision

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for AccessRightsDecision

Source§

impl Debug for AccessRightsDecision

Source§

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

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

impl Eq for AccessRightsDecision

Source§

impl PartialEq for AccessRightsDecision

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AccessRightsDecision

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more