pub struct SubjectAttributes(/* private fields */);Expand description
Subject values per dimension, gathered before the pure resolver runs.
A dimension with no values for the user is simply absent, which makes its rules unmatchable for that request.
Implementations§
Source§impl SubjectAttributes
impl SubjectAttributes
Sourcepub const EMPTY: Self
pub const EMPTY: Self
No values for any dimension. Const so callers with no extension
dimensions registered can pass &SubjectAttributes::EMPTY without a
binding.
pub const fn new() -> Self
Sourcepub fn insert(&mut self, rule_type: RuleType, values: Vec<String>)
pub fn insert(&mut self, rule_type: RuleType, values: Vec<String>)
Records the values for one dimension, replacing any previous entry.
Sourcepub fn values(&self, rule_type: &RuleType) -> &[String]
pub fn values(&self, rule_type: &RuleType) -> &[String]
Values the user holds for rule_type, empty when the dimension is
unregistered or the user has no value for it.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for SubjectAttributes
impl Clone for SubjectAttributes
Source§fn clone(&self) -> SubjectAttributes
fn clone(&self) -> SubjectAttributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SubjectAttributes
impl Debug for SubjectAttributes
Source§impl Default for SubjectAttributes
impl Default for SubjectAttributes
Source§fn default() -> SubjectAttributes
fn default() -> SubjectAttributes
Returns the “default value” for a type. Read more
impl Eq for SubjectAttributes
Source§impl FromIterator<(RuleType, Vec<String>)> for SubjectAttributes
impl FromIterator<(RuleType, Vec<String>)> for SubjectAttributes
Source§impl PartialEq for SubjectAttributes
impl PartialEq for SubjectAttributes
impl StructuralPartialEq for SubjectAttributes
Auto Trait Implementations§
impl Freeze for SubjectAttributes
impl RefUnwindSafe for SubjectAttributes
impl Send for SubjectAttributes
impl Sync for SubjectAttributes
impl Unpin for SubjectAttributes
impl UnsafeUnpin for SubjectAttributes
impl UnwindSafe for SubjectAttributes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more