Struct Plugin Worker Server

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

1pub struct PluginWorkerServer<T> { /* private fields */ }

Implementations

impl<T> PluginWorkerServer<T>

impl<T> PluginWorkerServer<T>

new

pub fn new(inner: T) -> Self

from_arc

pub fn from_arc(inner: Arc<T>) -> Self

with_interceptor

pub fn with_interceptor<F>(
    inner: T,
    interceptor: F,
) -> InterceptedService<Self, F>where
    F: Interceptor,

accept_compressed

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing requests with the given encoding.

send_compressed

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress responses with the given encoding, if the client supports it.

max_decoding_message_size

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

max_encoding_message_size

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

Trait Implementations

impl<T> Clone for PluginWorkerServer<T>

impl<T> Clone for PluginWorkerServer<T>

clone

fn clone(&self) -> Self

clone_from

fn clone_from(&mut self, source: &Self)

impl<T: Debug> Debug for PluginWorkerServer<T>

impl<T: Debug> Debug for PluginWorkerServer<T>

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T> NamedService for PluginWorkerServer<T>

impl<T> NamedService for PluginWorkerServer<T>

NAME

const NAME: &'static str = SERVICE_NAME

impl<T, B> Service<Request<B>> for PluginWorkerServer<T>where T: PluginWorker, B: Body + Send + 'static, B::Error: Into<StdError> + Send + 'static,

impl<T, B> Service<Request<B>> for PluginWorkerServer<T>where
    T: PluginWorker,
    B: Body + Send + 'static,
    B::Error: Into<StdError> + Send + 'static,

Response

type Response = Response<Body>

Error

type Error = Infallible

Future

type Future = Pin<Box<dyn Future<Output = Result<<PluginWorkerServer<T> as Service<Request<B>>>::Response, <PluginWorkerServer<T> as Service<Request<B>>>::Error>> + Send>>

poll_ready

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

call

fn call(&mut self, req: Request<B>) -> Self::Future