pub struct NamespaceToken { /* private fields */ }Expand description
Authorization proof that a caller is permitted to access a specific namespace.
Created by [VerbRegistry::dispatch] after the gate approves the request.
The sealed inner field prevents external code from constructing a token
without going through the authorization path.
Implementations§
Source§impl NamespaceToken
impl NamespaceToken
Sourcepub fn with_namespace(&self, ns: Namespace) -> Self
pub fn with_namespace(&self, ns: Namespace) -> Self
Return a new token with the same actor but a different namespace.
Used by packs that apply a namespace policy (e.g. the KG pack overrides the
caller’s namespace to Namespace::local() so that entity/edge/note records
always land in the shared graph).
Trait Implementations§
Source§impl Clone for NamespaceToken
impl Clone for NamespaceToken
Source§fn clone(&self) -> NamespaceToken
fn clone(&self) -> NamespaceToken
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 NamespaceToken
impl RefUnwindSafe for NamespaceToken
impl Send for NamespaceToken
impl Sync for NamespaceToken
impl Unpin for NamespaceToken
impl UnsafeUnpin for NamespaceToken
impl UnwindSafe for NamespaceToken
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