pub struct AccessResource<'a> {
pub identity: Option<&'a str>,
pub agent_id: Option<&'a str>,
pub role: Option<&'a str>,
pub labels: Option<&'a BTreeMap<String, String>>,
}Expand description
Attributes of the resource a check targets. All fields are optional:
checks for non-agent actions (e.g. gating.decide) carry no resource
at all and only match rules without resource selectors.
Fields§
§identity: Option<&'a str>Agent identity (preferred key, e.g. identity:ops-lead).
agent_id: Option<&'a str>Runtime agent/member id, matched against rule agents as a fallback.
role: Option<&'a str>Agent role/profile name.
labels: Option<&'a BTreeMap<String, String>>Agent labels. None means the attributes are unknown (label
selectors cannot match); Some empty means known-empty.
Implementations§
Source§impl<'a> AccessResource<'a>
impl<'a> AccessResource<'a>
pub fn none() -> Self
pub fn for_identity(identity: &'a str) -> Self
Trait Implementations§
Source§impl<'a> Clone for AccessResource<'a>
impl<'a> Clone for AccessResource<'a>
Source§fn clone(&self) -> AccessResource<'a>
fn clone(&self) -> AccessResource<'a>
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 moreimpl<'a> Copy for AccessResource<'a>
Source§impl<'a> Debug for AccessResource<'a>
impl<'a> Debug for AccessResource<'a>
Source§impl<'a> Default for AccessResource<'a>
impl<'a> Default for AccessResource<'a>
Source§fn default() -> AccessResource<'a>
fn default() -> AccessResource<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for AccessResource<'a>
impl<'a> RefUnwindSafe for AccessResource<'a>
impl<'a> Send for AccessResource<'a>
impl<'a> Sync for AccessResource<'a>
impl<'a> Unpin for AccessResource<'a>
impl<'a> UnsafeUnpin for AccessResource<'a>
impl<'a> UnwindSafe for AccessResource<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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