Struct jsonrpc_client_transports::transports::local::LocalRpc[][src]

pub struct LocalRpc<THandler, TMetadata> { /* fields omitted */ }

Implements a rpc client for MetaIoHandler.

Implementations

impl<TMetadata, THandler, TMiddleware> LocalRpc<THandler, TMetadata> where
    TMetadata: Metadata,
    TMiddleware: Middleware<TMetadata>,
    THandler: Deref<Target = MetaIoHandler<TMetadata, TMiddleware>>, 
[src]

pub fn new(handler: THandler) -> Self where
    TMetadata: Default
[src]

Creates a new LocalRpc with default metadata.

pub fn with_metadata(handler: THandler, meta: TMetadata) -> Self[src]

Creates a new LocalRpc with given handler and metadata.

Trait Implementations

impl<TMetadata, THandler, TMiddleware> Sink for LocalRpc<THandler, TMetadata> where
    TMetadata: Metadata,
    TMiddleware: Middleware<TMetadata>,
    THandler: Deref<Target = MetaIoHandler<TMetadata, TMiddleware>>, 
[src]

type SinkItem = String

The type of value that the sink accepts.

type SinkError = RpcError

The type of value produced by the sink when an error occurs.

impl<TMetadata, THandler, TMiddleware> Stream for LocalRpc<THandler, TMetadata> where
    TMetadata: Metadata,
    TMiddleware: Middleware<TMetadata>,
    THandler: Deref<Target = MetaIoHandler<TMetadata, TMiddleware>>, 
[src]

type Item = String

The type of item this stream will yield on success.

type Error = RpcError

The type of error this stream may generate.

Auto Trait Implementations

impl<THandler, TMetadata> !RefUnwindSafe for LocalRpc<THandler, TMetadata>

impl<THandler, TMetadata> Send for LocalRpc<THandler, TMetadata> where
    THandler: Send,
    TMetadata: Send

impl<THandler, TMetadata> Sync for LocalRpc<THandler, TMetadata> where
    THandler: Sync,
    TMetadata: Sync

impl<THandler, TMetadata> Unpin for LocalRpc<THandler, TMetadata> where
    THandler: Unpin,
    TMetadata: Unpin

impl<THandler, TMetadata> !UnwindSafe for LocalRpc<THandler, TMetadata>

Blanket Implementations

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

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

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

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

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

impl<T> StreamExt for T where
    T: Stream + ?Sized
[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> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]