jsonrpc_ipc_server

Struct ServerBuilder

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

IPC server builder

Implementations§

Source§

impl<M: Metadata + Default, S: Middleware<M>> ServerBuilder<M, S>
where S::Future: Unpin, S::CallFuture: Unpin,

Source

pub fn new<T>(io_handler: T) -> ServerBuilder<M, S>
where T: Into<MetaIoHandler<M, S>>,

Creates new IPC server build given the IoHandler.

Source§

impl<M: Metadata, S: Middleware<M>> ServerBuilder<M, S>
where S::Future: Unpin, S::CallFuture: Unpin,

Source

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.

Source

pub fn event_loop_executor(self, executor: TaskExecutor) -> Self

Sets shared different event loop executor.

Source

pub fn session_meta_extractor<X>(self, meta_extractor: X) -> Self
where X: MetaExtractor<M>,

Sets session metadata extractor.

Source

pub fn session_stats<T: SessionStats>(self, stats: T) -> Self

Session stats

Source

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

Sets the incoming and outgoing requests separator

Source

pub fn set_security_attributes(self, attr: SecurityAttributes) -> Self

Sets the security attributes for the underlying IPC socket/pipe

Source

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.

Source

pub fn start(self, path: &str) -> Result<Server>

Creates a new server from the given endpoint.

Auto Trait Implementations§

§

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

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V