Struct cedar_policy_core::ast::Request
source · pub struct Request { /* private fields */ }
Expand description
Represents the request tuple <P, A, R, C> (see the Cedar design doc).
Implementations§
source§impl Request
impl Request
sourcepub fn new(
principal: EntityUID,
action: EntityUID,
resource: EntityUID,
context: Context,
) -> Self
pub fn new( principal: EntityUID, action: EntityUID, resource: EntityUID, context: Context, ) -> Self
Default constructor
sourcepub fn new_with_unknowns(
principal: EntityUIDEntry,
action: EntityUIDEntry,
resource: EntityUIDEntry,
context: Option<Context>,
) -> Self
pub fn new_with_unknowns( principal: EntityUIDEntry, action: EntityUIDEntry, resource: EntityUIDEntry, context: Option<Context>, ) -> Self
Create a new request with potentially unknown (for partial eval) head variables
sourcepub fn principal(&self) -> &EntityUIDEntry
pub fn principal(&self) -> &EntityUIDEntry
Get the principal associated with the request
sourcepub fn action(&self) -> &EntityUIDEntry
pub fn action(&self) -> &EntityUIDEntry
Get the action associated with the request
sourcepub fn resource(&self) -> &EntityUIDEntry
pub fn resource(&self) -> &EntityUIDEntry
Get the resource associated with the request
Trait Implementations§
source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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