jsonrpc_tcp_server

Trait MetaExtractor

Source
pub trait MetaExtractor<M: Metadata>: Send + Sync {
    // Required method
    fn extract(&self, context: &RequestContext) -> M;
}
Expand description

Metadata extractor (per session)

Required Methods§

Source

fn extract(&self, context: &RequestContext) -> M

Extracts metadata from request context

Implementors§

Source§

impl<M, F> MetaExtractor<M> for F
where M: Metadata, F: Fn(&RequestContext) -> M + Send + Sync,