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 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