pub struct AcpScope {
pub caller: AcpCaller,
pub requested_acp_id: Option<Uuid>,
pub allowed: bool,
}Expand description
Resolved scope context, injected into request extensions by the
ScopeGuard middleware. Handlers read it via
req.extensions().get::<AcpScope>() (or via an extractor in a
follow-up story).
Fields§
§caller: AcpCallerCaller derived from JWT (mapped by the same convention as
acp_handlers::caller_from_user).
requested_acp_id: Option<Uuid>ACP id explicitly requested by the client (header/query).
None = use role-derived default scope.
allowed: booltrue if the middleware has verified the caller is allowed to
see the requested ACP. Always true when requested_acp_id is
None (no forging possible).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AcpScope
impl RefUnwindSafe for AcpScope
impl Send for AcpScope
impl Sync for AcpScope
impl Unpin for AcpScope
impl UnsafeUnpin for AcpScope
impl UnwindSafe for AcpScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.