#[non_exhaustive]pub struct Actor { /* private fields */ }
Implementations§
Source§impl Actor
impl Actor
pub fn new(id: String, roles: Vec<Role>, level: Level) -> Self
Sourcepub fn has_editor_role(&self) -> bool
pub fn has_editor_role(&self) -> bool
Checks if the actor has the Editor role.
Sourcepub fn has_viewer_role(&self) -> bool
pub fn has_viewer_role(&self) -> bool
Checks if the actor has the Viewer role.
pub fn cedar_attrs(&self) -> HashMap<String, RestrictedExpression>
pub fn cedar_parents(&self) -> HashSet<EntityUid>
pub fn cedar_entities(&self) -> Vec<Entity>
Methods from Deref<Target = Resource>§
pub fn id(&self) -> &str
pub fn kind(&self) -> &ResourceKind
pub fn level(&self) -> &Level
pub fn cedar_attrs(&self) -> HashMap<String, RestrictedExpression>
pub fn cedar_parents(&self) -> HashSet<EntityUid>
pub fn cedar_entities(&self) -> Vec<Entity>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Actor
impl<'de> Deserialize<'de> for Actor
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<(&DefineAccessStatement, Level)> for Actor
impl From<(&DefineAccessStatement, Level)> for Actor
Source§fn from(val: (&DefineAccessStatement, Level)) -> Self
fn from(val: (&DefineAccessStatement, Level)) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for Actor
impl PartialOrd for Actor
Source§impl Revisioned for Actor
impl Revisioned for Actor
impl Eq for Actor
impl StructuralPartialEq for Actor
Auto Trait Implementations§
impl Freeze for Actor
impl RefUnwindSafe for Actor
impl Send for Actor
impl Sync for Actor
impl Unpin for Actor
impl UnwindSafe for Actor
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<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