pub struct Caller(/* private fields */);Expand description
The caller of the call being run, as the service’s gate admitted them:
caller().
Implementations§
Source§impl Caller
impl Caller
Sourcepub fn auth(&self) -> Option<&AuthContext>
pub fn auth(&self) -> Option<&AuthContext>
The identity the gate admitted; None for an anonymous caller (a
public method, or a sign-in that has ended).
Sourcepub fn signed_in(&self) -> Result<&AuthContext, PlexusError>
pub fn signed_in(&self) -> Result<&AuthContext, PlexusError>
The identity, signed in — Unauthenticated for an anonymous caller,
as #[from_auth] refuses one.
Sourcepub fn context(&self) -> &CallContext
pub fn context(&self) -> &CallContext
The whole context, to hand to work the method spawns (scope).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Caller
impl !UnwindSafe for Caller
impl Forget for Caller
impl Freeze for Caller
impl Send for Caller
impl Sync for Caller
impl Unpin for Caller
impl UnsafeUnpin for Caller
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