pub struct CallerContext { /* private fields */ }Expand description
Who is asking for a dispatch. Fields are private on purpose: the only
way to obtain trusted_local = true is Self::trusted_local_caller.
Implementations§
Source§impl CallerContext
impl CallerContext
Sourcepub fn trusted_local_caller(subject: impl Into<String>) -> Self
pub fn trusted_local_caller(subject: impl Into<String>) -> Self
The one constructor that grants local trust. Reserved for callers the process itself vouches for: the CLI/loopback path and an explicitly configured authz-enforcing trusted gateway.
Sourcepub fn remote_scoped(subject: impl Into<String>, scopes: Vec<String>) -> Self
pub fn remote_scoped(subject: impl Into<String>, scopes: Vec<String>) -> Self
A remote caller carrying token scopes. trusted_local is hard-coded
false: no scope set a network caller presents can confer local trust.
Sourcepub fn is_trusted_local(&self) -> bool
pub fn is_trusted_local(&self) -> bool
Whether this caller was granted local trust.
Trait Implementations§
Source§impl Clone for CallerContext
impl Clone for CallerContext
Source§fn clone(&self) -> CallerContext
fn clone(&self) -> CallerContext
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 moreSource§impl Debug for CallerContext
impl Debug for CallerContext
Source§impl PartialEq for CallerContext
impl PartialEq for CallerContext
Source§fn eq(&self, other: &CallerContext) -> bool
fn eq(&self, other: &CallerContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CallerContext
impl StructuralPartialEq for CallerContext
Auto Trait Implementations§
impl Freeze for CallerContext
impl RefUnwindSafe for CallerContext
impl Send for CallerContext
impl Sync for CallerContext
impl Unpin for CallerContext
impl UnsafeUnpin for CallerContext
impl UnwindSafe for CallerContext
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.