Struct jsonrpc_ipc_server::ServerBuilder
source · [−]pub struct ServerBuilder<M: Metadata = (), S: Middleware<M> = Noop> { /* private fields */ }
Expand description
IPC server builder
Implementations
sourceimpl<M: Metadata + Default, S: Middleware<M>> ServerBuilder<M, S>
impl<M: Metadata + Default, S: Middleware<M>> ServerBuilder<M, S>
sourcepub fn new<T>(io_handler: T) -> ServerBuilder<M, S> where
T: Into<MetaIoHandler<M, S>>,
pub fn new<T>(io_handler: T) -> ServerBuilder<M, S> where
T: Into<MetaIoHandler<M, S>>,
Creates new IPC server build given the IoHandler
.
sourceimpl<M: Metadata, S: Middleware<M>> ServerBuilder<M, S>
impl<M: Metadata, S: Middleware<M>> ServerBuilder<M, S>
sourcepub fn with_meta_extractor<T, E>(
io_handler: T,
extractor: E
) -> ServerBuilder<M, S> where
T: Into<MetaIoHandler<M, S>>,
E: MetaExtractor<M>,
pub fn with_meta_extractor<T, E>(
io_handler: T,
extractor: E
) -> ServerBuilder<M, S> where
T: Into<MetaIoHandler<M, S>>,
E: MetaExtractor<M>,
Creates new IPC server build given the IoHandler
and metadata extractor.
sourcepub fn event_loop_executor(self, executor: TaskExecutor) -> Self
pub fn event_loop_executor(self, executor: TaskExecutor) -> Self
Sets shared different event loop executor.
sourcepub fn event_loop_reactor(self, reactor: Handle) -> Self
pub fn event_loop_reactor(self, reactor: Handle) -> Self
Sets different event loop I/O reactor.
sourcepub fn session_meta_extractor<X>(self, meta_extractor: X) -> Self where
X: MetaExtractor<M>,
pub fn session_meta_extractor<X>(self, meta_extractor: X) -> Self where
X: MetaExtractor<M>,
Sets session metadata extractor.
sourcepub fn session_stats<T: SessionStats>(self, stats: T) -> Self
pub fn session_stats<T: SessionStats>(self, stats: T) -> Self
Session stats
sourcepub fn request_separators(
self,
incoming: Separator,
outgoing: Separator
) -> Self
pub fn request_separators(
self,
incoming: Separator,
outgoing: Separator
) -> Self
Sets the incoming and outgoing requests separator
sourcepub fn set_security_attributes(self, attr: SecurityAttributes) -> Self
pub fn set_security_attributes(self, attr: SecurityAttributes) -> Self
Sets the security attributes for the underlying IPC socket/pipe
sourcepub fn set_client_buffer_size(self, buffer_size: usize) -> Self
pub fn set_client_buffer_size(self, buffer_size: usize) -> Self
Sets how many concurrent requests per client can be processed at any one time. Set to 5 by default.
Auto Trait Implementations
impl<M = (), S = Noop> !RefUnwindSafe for ServerBuilder<M, S>
impl<M, S> Send for ServerBuilder<M, S>
impl<M, S> Sync for ServerBuilder<M, S>
impl<M, S> Unpin for ServerBuilder<M, S>
impl<M = (), S = Noop> !UnwindSafe for ServerBuilder<M, S>
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