#[non_exhaustive]pub enum EntityReference {
Identifier(EntityIdentifier),
Unspecified(bool),
Unknown,
}Expand description
Contains information about a principal or resource that can be referenced in a Cedar policy.
This data type is used as part of the PolicyFilter structure that is used as a request parameter for the ListPolicies operation..
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Identifier(EntityIdentifier)
The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
Unspecified(bool)
Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
Unknown
The Unknown variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
An unknown enum variant
Note: If you encounter this error, consider upgrading your SDK to the latest version.
The Unknown variant represents cases where the server sent a value that wasn’t recognized
by the client. This can happen when the server adds new functionality, but the client has not been updated.
To investigate this, consider turning on debug logging to print the raw HTTP response.
Implementations§
source§impl EntityReference
impl EntityReference
sourcepub fn as_identifier(&self) -> Result<&EntityIdentifier, &Self>
pub fn as_identifier(&self) -> Result<&EntityIdentifier, &Self>
Tries to convert the enum instance into Identifier, extracting the inner EntityIdentifier.
Returns Err(&Self) if it can’t be converted.
sourcepub fn is_identifier(&self) -> bool
pub fn is_identifier(&self) -> bool
Returns true if this is a Identifier.
sourcepub fn as_unspecified(&self) -> Result<&bool, &Self>
pub fn as_unspecified(&self) -> Result<&bool, &Self>
Tries to convert the enum instance into Unspecified, extracting the inner bool.
Returns Err(&Self) if it can’t be converted.
sourcepub fn is_unspecified(&self) -> bool
pub fn is_unspecified(&self) -> bool
Returns true if this is a Unspecified.
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the enum instance is the Unknown variant.
Trait Implementations§
source§impl Clone for EntityReference
impl Clone for EntityReference
source§fn clone(&self) -> EntityReference
fn clone(&self) -> EntityReference
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for EntityReference
impl Debug for EntityReference
source§impl PartialEq for EntityReference
impl PartialEq for EntityReference
impl StructuralPartialEq for EntityReference
Auto Trait Implementations§
impl Freeze for EntityReference
impl RefUnwindSafe for EntityReference
impl Send for EntityReference
impl Sync for EntityReference
impl Unpin for EntityReference
impl UnwindSafe for EntityReference
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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>
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>
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