Expand description
RPC methods metadata.
Fields
origin: Origin
Request origin
session: Option<Arc<Session>>
Request PubSub Session
Trait Implementations
sourceimpl MetaExtractor<Metadata> for RpcExtractor
impl MetaExtractor<Metadata> for RpcExtractor
sourcefn read_metadata(&self, req: &Request<Body>) -> Metadata
fn read_metadata(&self, req: &Request<Body>) -> Metadata
Read the metadata from the request
sourceimpl MetaExtractor<Metadata> for RpcExtractor
impl MetaExtractor<Metadata> for RpcExtractor
sourcefn extract(&self, req: &RequestContext<'_>) -> Metadata
fn extract(&self, req: &RequestContext<'_>) -> Metadata
Extracts metadata from request context
sourceimpl MetaExtractor<Metadata> for WsExtractor
impl MetaExtractor<Metadata> for WsExtractor
sourcefn extract(&self, req: &RequestContext) -> Metadata
fn extract(&self, req: &RequestContext) -> Metadata
Extract metadata for given session
sourceimpl<M: Middleware<Metadata>> Middleware<Metadata> for WsDispatcher<M>
impl<M: Middleware<Metadata>> Middleware<Metadata> for WsDispatcher<M>
type Future = Either<FutureRpcResult<M::Future, M::CallFuture>, FutureResponse>
type Future = Either<FutureRpcResult<M::Future, M::CallFuture>, FutureResponse>
A returned request future.
type CallFuture = NoopCallFuture
type CallFuture = NoopCallFuture
A returned call future.
sourcefn on_request<F, X>(
&self,
request: Request,
meta: Metadata,
process: F
) -> Either<Self::Future, X> where
F: FnOnce(Request, Metadata) -> X,
X: Future<Item = Option<Response>, Error = ()> + Send + 'static,
fn on_request<F, X>(
&self,
request: Request,
meta: Metadata,
process: F
) -> Either<Self::Future, X> where
F: FnOnce(Request, Metadata) -> X,
X: Future<Item = Option<Response>, Error = ()> + Send + 'static,
Method invoked on each request. Allows you to either respond directly (without executing RPC call) or do any additional work before and/or after processing the request. Read more
sourceimpl PubSubMetadata for Metadata
impl PubSubMetadata for Metadata
impl Metadata for Metadata
Auto Trait Implementations
impl !RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl !UnwindSafe for Metadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more