jsonrpc_ipc_server

Trait MetaExtractor

Source
pub trait MetaExtractor<M: Metadata>:
    Send
    + Sync
    + 'static {
    // 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 + 'static,

Source§

impl<M: Metadata + Default> MetaExtractor<M> for NoopExtractor