#[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
source§fn eq(&self, other: &EntityReference) -> bool
fn eq(&self, other: &EntityReference) -> bool
self and other values to be equal, and is used
by ==.