#[non_exhaustive]pub struct AuthzRequest<'a> {
pub principal: Option<&'a SecurityContext>,
pub operation: OperationKind,
pub name: &'a str,
pub input: Option<&'a Value>,
}Expand description
An operation-level authorization request handed to an Authorizer.
Carries the principal (or None for an anonymous request), the operation kind
and root field name, and the request input — the inputs a static role check lacks.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.principal: Option<&'a SecurityContext>The authenticated principal, or None for an unauthenticated (anonymous) request.
operation: OperationKindThe kind of operation (query / mutation / subscription).
name: &'a strThe root operation field name (e.g. "users", "createUser", "_entities",
"__schema").
input: Option<&'a Value>The request input — GraphQL variables or REST arguments — when present.
Auto Trait Implementations§
impl<'a> Freeze for AuthzRequest<'a>
impl<'a> RefUnwindSafe for AuthzRequest<'a>
impl<'a> Send for AuthzRequest<'a>
impl<'a> Sync for AuthzRequest<'a>
impl<'a> Unpin for AuthzRequest<'a>
impl<'a> UnsafeUnpin for AuthzRequest<'a>
impl<'a> UnwindSafe for AuthzRequest<'a>
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