pub struct Name {
pub id: Id,
pub namespace: Arc<Vec<Id>>,
}Expand description
A qualified name (e.g., Namespace::Type).
Represents entity types, action names, and other identifiers in Cedar. Names consist of a basename and optional namespace components.
// Unqualified: just a basename
User
Photo
// Qualified: namespace components followed by basename
MyApp::User
AWS::EC2::InstanceFields§
§id: IdBasename (the final component of the name)
namespace: Arc<Vec<Id>>Namespace components (empty for unqualified names)
Implementations§
Source§impl Name
impl Name
Sourcepub fn unqualified(id: impl AsRef<str>) -> Result<Name, PstConstructionError>
pub fn unqualified(id: impl AsRef<str>) -> Result<Name, PstConstructionError>
Constructs an unqualified name. This is a convenience constructor that validates
that id is a legal Cedar identifier.
If you have an Id (which is AsRef<str>), you can infallibly construct the name
yourself.
Trait Implementations§
impl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnsafeUnpin for Name
impl UnwindSafe for Name
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> 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