Struct cedar_policy_core::ast::Annotations
source · pub struct Annotations(/* private fields */);
Expand description
Struct which holds the annotations for a policy
Implementations§
source§impl Annotations
impl Annotations
sourcepub fn get(&self, key: &AnyId) -> Option<&Annotation>
pub fn get(&self, key: &AnyId) -> Option<&Annotation>
Get an annotation by key
sourcepub fn iter(&self) -> impl Iterator<Item = (&AnyId, &Annotation)>
pub fn iter(&self) -> impl Iterator<Item = (&AnyId, &Annotation)>
Iterate over all annotations
sourcepub fn into_iter(self) -> impl Iterator<Item = (AnyId, Annotation)>
pub fn into_iter(self) -> impl Iterator<Item = (AnyId, Annotation)>
Consume this Annotations
, iterating over all the annotations
Trait Implementations§
source§impl Clone for Annotations
impl Clone for Annotations
source§fn clone(&self) -> Annotations
fn clone(&self) -> Annotations
Returns a copy of the value. Read more
1.0.0 · 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 Annotations
impl Debug for Annotations
source§impl Default for Annotations
impl Default for Annotations
source§impl<'de> Deserialize<'de> for Annotations
impl<'de> Deserialize<'de> for Annotations
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<BTreeMap<AnyId, Annotation>> for Annotations
impl From<BTreeMap<AnyId, Annotation>> for Annotations
source§impl FromIterator<(AnyId, Annotation)> for Annotations
impl FromIterator<(AnyId, Annotation)> for Annotations
source§fn from_iter<T: IntoIterator<Item = (AnyId, Annotation)>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = (AnyId, Annotation)>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl Hash for Annotations
impl Hash for Annotations
source§impl PartialEq for Annotations
impl PartialEq for Annotations
source§fn eq(&self, other: &Annotations) -> bool
fn eq(&self, other: &Annotations) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Annotations
impl Serialize for Annotations
impl Eq for Annotations
impl StructuralPartialEq for Annotations
Auto Trait Implementations§
impl Freeze for Annotations
impl RefUnwindSafe for Annotations
impl Send for Annotations
impl Sync for Annotations
impl Unpin for Annotations
impl UnwindSafe for Annotations
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