[][src]Struct jsonrpc_tcp_server::ServerBuilder

pub struct ServerBuilder<M: Metadata = (), S: Middleware<M> = Noop> { /* fields omitted */ }

TCP server builder

Methods

impl<M: Metadata + Default, S: Middleware<M> + 'static> ServerBuilder<M, S>[src]

pub fn new<T>(handler: T) -> Self where
    T: Into<MetaIoHandler<M, S>>, 
[src]

Creates new ServerBuilder wih given IoHandler

impl<M: Metadata, S: Middleware<M> + 'static> ServerBuilder<M, S>[src]

pub fn with_meta_extractor<T, E>(handler: T, extractor: E) -> Self where
    T: Into<MetaIoHandler<M, S>>,
    E: MetaExtractor<M> + 'static, 
[src]

Creates new ServerBuilder wih given IoHandler

pub fn event_loop_executor(self, handle: TaskExecutor) -> Self[src]

Utilize existing event loop executor.

pub fn session_meta_extractor<T: MetaExtractor<M> + 'static>(
    self,
    meta_extractor: T
) -> Self
[src]

Sets session meta extractor

pub fn request_separators(
    self,
    incoming: Separator,
    outgoing: Separator
) -> Self
[src]

Sets the incoming and outgoing requests separator

pub fn start(self, addr: &SocketAddr) -> Result<Server>[src]

Starts a new server

pub fn dispatcher(&self) -> Dispatcher[src]

Returns dispatcher

Auto Trait Implementations

impl<M, S> Unpin for ServerBuilder<M, S>

impl<M, S> Sync for ServerBuilder<M, S>

impl<M, S> Send for ServerBuilder<M, S>

impl<M = (), S = Noop> !UnwindSafe for ServerBuilder<M, S>

impl<M = (), S = Noop> !RefUnwindSafe for ServerBuilder<M, S>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]