pub struct CallContext {
pub method: String,
pub caller_identity: Option<String>,
pub extensions: Vec<String>,
}Expand description
Metadata about the current server-side method call.
Passed to ServerInterceptor::before
and ServerInterceptor::after.
Fields§
§method: StringThe JSON-RPC method name (e.g. "message/send").
caller_identity: Option<String>Optional caller identity extracted from authentication headers.
extensions: Vec<String>Extension URIs active for this request.
Implementations§
Source§impl CallContext
impl CallContext
Sourcepub fn new(method: impl Into<String>) -> CallContext
pub fn new(method: impl Into<String>) -> CallContext
Creates a new CallContext for the given method.
Sourcepub fn with_caller_identity(self, identity: String) -> CallContext
pub fn with_caller_identity(self, identity: String) -> CallContext
Sets the caller identity.
Sourcepub fn with_extensions(self, extensions: Vec<String>) -> CallContext
pub fn with_extensions(self, extensions: Vec<String>) -> CallContext
Sets the active extensions.
Trait Implementations§
Source§impl Clone for CallContext
impl Clone for CallContext
Source§fn clone(&self) -> CallContext
fn clone(&self) -> CallContext
Returns a duplicate of the value. Read more
1.0.0 · 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 CallContext
impl RefUnwindSafe for CallContext
impl Send for CallContext
impl Sync for CallContext
impl Unpin for CallContext
impl UnsafeUnpin for CallContext
impl UnwindSafe for CallContext
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