pub struct ActionQueryRequest { /* private fields */ }Available on crate feature
tpe only.Expand description
Defines a PartialRequest which additionally leaves the action
undefined, enabling queries listing what actions might be authorized.
See PolicySet::query_action for documentation and example usage.
This feature is experimental. For more information see https://github.com/cedar-policy/rfcs/blob/main/README.md#experimental-features
Implementations§
Source§impl ActionQueryRequest
impl ActionQueryRequest
Sourcepub fn new(
principal: PartialEntityUid,
resource: PartialEntityUid,
context: Option<Context>,
schema: Schema,
) -> Result<Self, PartialRequestCreationError>
pub fn new( principal: PartialEntityUid, resource: PartialEntityUid, context: Option<Context>, schema: Schema, ) -> Result<Self, PartialRequestCreationError>
Construct an ActionQueryRequest.
Unlike PartialRequest::new, this constructor cannot validate the
request because request validation requires knowing the specific action
being authorized. Further, PolicySet::query_action cannot report
request validation errors because it is expected that the
principal, resource, and context will be invalid for many of the
actions in the schema.
Trait Implementations§
Source§impl Clone for ActionQueryRequest
impl Clone for ActionQueryRequest
Source§fn clone(&self) -> ActionQueryRequest
fn clone(&self) -> ActionQueryRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ActionQueryRequest
impl RefUnwindSafe for ActionQueryRequest
impl Send for ActionQueryRequest
impl Sync for ActionQueryRequest
impl Unpin for ActionQueryRequest
impl UnsafeUnpin for ActionQueryRequest
impl UnwindSafe for ActionQueryRequest
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§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