pub struct LabelSet(/* private fields */);Expand description
A validated set of label rules.
Implementations§
Source§impl LabelSet
impl LabelSet
Sourcepub fn from_json_str(input: &str) -> Result<Self>
pub fn from_json_str(input: &str) -> Result<Self>
Parse and strictly validate a JSON label document.
Sourcepub fn validate_schema_json_str(&self, schema_source: &str) -> Result<()>
pub fn validate_schema_json_str(&self, schema_source: &str) -> Result<()>
Validate label entity and attribute types against a complete Cedar JSON schema.
pub fn rules(&self) -> &[LabelRule]
pub fn is_empty(&self) -> bool
Sourcepub fn to_labelers(&self) -> Vec<Arc<dyn Labeler>>
pub fn to_labelers(&self) -> Vec<Arc<dyn Labeler>>
Return one scoped runtime owner per rule in configuration order.
Targets and regex programs were validated at parsing time. Attribute names can repeat on disjoint resource types; duplicate tuples are rejected.
Trait Implementations§
impl Eq for LabelSet
impl StructuralPartialEq for LabelSet
Auto Trait Implementations§
impl !RefUnwindSafe for LabelSet
impl !UnwindSafe for LabelSet
impl Freeze for LabelSet
impl Send for LabelSet
impl Sync for LabelSet
impl Unpin for LabelSet
impl UnsafeUnpin for LabelSet
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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