Struct cedar_policy::Request
source · #[repr(transparent)]pub struct Request(_);
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: Option<EntityUid>,
action: Option<EntityUid>,
resource: Option<EntityUid>,
context: Context
) -> Self
pub fn new( principal: Option<EntityUid>, action: Option<EntityUid>, resource: Option<EntityUid>, context: Context ) -> Self
Create a Request.
Note that you can create the EntityUid
s using .parse()
on any
string (via the FromStr
implementation for EntityUid
).
The principal, action, and resource fields are optional to support
the case where these fields do not contribute to authorization
decisions (e.g., because they are not used in your policies).
If any of the fields are None
, we will automatically generate
a unique entity UID that is not equal to any UID in the store.
Trait Implementations§
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