pub struct SpecifiedPrincipal { /* private fields */ }
Expand description
A non-wildcard principal statement in an Aspen policy.
SpecifiedPrincipal structs are immutable. To construct this programmatically, use SpecifiedPrincipalBuilder.
Implementations§
Source§impl SpecifiedPrincipal
impl SpecifiedPrincipal
Sourcepub fn builder() -> SpecifiedPrincipalBuilder
pub fn builder() -> SpecifiedPrincipalBuilder
Create a SpecifiedPrincipalBuilder to programmatically construct a SpecifiedPrincipal.
Sourcepub fn aws(&self) -> Option<&StringLikeList<AwsPrincipal>>
pub fn aws(&self) -> Option<&StringLikeList<AwsPrincipal>>
Returns the AWS principals specified in the statement.
Sourcepub fn canonical_user(&self) -> Option<&StringLikeList<String>>
pub fn canonical_user(&self) -> Option<&StringLikeList<String>>
Returns the canonical users specified in the statement.
Sourcepub fn federated(&self) -> Option<&StringLikeList<String>>
pub fn federated(&self) -> Option<&StringLikeList<String>>
Returns the federated users specified in the statement.
Sourcepub fn service(&self) -> Option<&StringLikeList<String>>
pub fn service(&self) -> Option<&StringLikeList<String>>
Returns the services specified in the statement.
Sourcepub fn matches(&self, actor: &PrincipalActor) -> bool
pub fn matches(&self, actor: &PrincipalActor) -> bool
Indicates whether this specified principal matches an identity from the PrincipalActor.
Trait Implementations§
Source§impl Clone for SpecifiedPrincipal
impl Clone for SpecifiedPrincipal
Source§fn clone(&self) -> SpecifiedPrincipal
fn clone(&self) -> SpecifiedPrincipal
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SpecifiedPrincipal
impl Debug for SpecifiedPrincipal
Source§impl<'de> Deserialize<'de> for SpecifiedPrincipal
impl<'de> Deserialize<'de> for SpecifiedPrincipal
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 Display for SpecifiedPrincipal
impl Display for SpecifiedPrincipal
Source§impl From<SpecifiedPrincipal> for Principal
impl From<SpecifiedPrincipal> for Principal
Source§fn from(sp: SpecifiedPrincipal) -> Self
fn from(sp: SpecifiedPrincipal) -> Self
Converts to this type from the input type.
Source§impl FromStr for SpecifiedPrincipal
impl FromStr for SpecifiedPrincipal
Source§impl PartialEq for SpecifiedPrincipal
impl PartialEq for SpecifiedPrincipal
Source§impl Serialize for SpecifiedPrincipal
impl Serialize for SpecifiedPrincipal
impl Eq for SpecifiedPrincipal
impl StructuralPartialEq for SpecifiedPrincipal
Auto Trait Implementations§
impl Freeze for SpecifiedPrincipal
impl RefUnwindSafe for SpecifiedPrincipal
impl Send for SpecifiedPrincipal
impl Sync for SpecifiedPrincipal
impl Unpin for SpecifiedPrincipal
impl UnwindSafe for SpecifiedPrincipal
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