[−][src]Struct jsonrpc_pubsub::IoDelegate
Wire up rpc subscriptions to delegate
struct
Implementations
impl<T, M> IoDelegate<T, M> where
T: Send + Sync + 'static,
M: PubSubMetadata,
[src]
T: Send + Sync + 'static,
M: PubSubMetadata,
pub fn new(delegate: Arc<T>) -> Self
[src]
Creates new PubSubIoDelegate
, wrapping the core IoDelegate
pub fn add_subscription<Sub, Unsub, I>(
&mut self,
name: &str,
subscribe: (&str, Sub),
unsubscribe: (&str, Unsub)
) where
Sub: Fn(&T, Params, M, Subscriber),
Sub: Send + Sync + 'static,
Unsub: Fn(&T, SubscriptionId, Option<M>) -> I,
I: IntoFuture<Item = Value, Error = Error>,
Unsub: Send + Sync + 'static,
I::Future: Send + 'static,
[src]
&mut self,
name: &str,
subscribe: (&str, Sub),
unsubscribe: (&str, Unsub)
) where
Sub: Fn(&T, Params, M, Subscriber),
Sub: Send + Sync + 'static,
Unsub: Fn(&T, SubscriptionId, Option<M>) -> I,
I: IntoFuture<Item = Value, Error = Error>,
Unsub: Send + Sync + 'static,
I::Future: Send + 'static,
Adds subscription to the delegate.
pub fn add_alias(&mut self, from: &str, to: &str)
[src]
Adds an alias to existing method.
pub fn add_method<F, I>(&mut self, name: &str, method: F) where
F: Fn(&T, Params) -> I,
I: IntoFuture<Item = Value, Error = Error>,
F: Send + Sync + 'static,
I::Future: Send + 'static,
[src]
F: Fn(&T, Params) -> I,
I: IntoFuture<Item = Value, Error = Error>,
F: Send + Sync + 'static,
I::Future: Send + 'static,
Adds async method to the delegate.
pub fn add_method_with_meta<F, I>(&mut self, name: &str, method: F) where
F: Fn(&T, Params, M) -> I,
I: IntoFuture<Item = Value, Error = Error>,
F: Send + Sync + 'static,
I::Future: Send + 'static,
[src]
F: Fn(&T, Params, M) -> I,
I: IntoFuture<Item = Value, Error = Error>,
F: Send + Sync + 'static,
I::Future: Send + 'static,
Adds async method with metadata to the delegate.
pub fn add_notification<F>(&mut self, name: &str, notification: F) where
F: Fn(&T, Params),
F: Send + Sync + 'static,
[src]
F: Fn(&T, Params),
F: Send + Sync + 'static,
Adds notification to the delegate.
Trait Implementations
impl<T, M> IntoIterator for IoDelegate<T, M> where
T: Send + Sync + 'static,
M: Metadata,
[src]
T: Send + Sync + 'static,
M: Metadata,
type Item = (String, RemoteProcedure<M>)
The type of the elements being iterated over.
type IntoIter = <IoDelegate<T, M> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T, M> IoHandlerExtension<M> for IoDelegate<T, M> where
T: Send + Sync + 'static,
M: Metadata,
[src]
T: Send + Sync + 'static,
M: Metadata,
fn augment<S: Middleware<M>>(self, handler: &mut MetaIoHandler<M, S>)
[src]
Auto Trait Implementations
impl<T, M = ()> !RefUnwindSafe for IoDelegate<T, M>
impl<T, M> Send for IoDelegate<T, M>
impl<T, M> Sync for IoDelegate<T, M> where
M: Sync,
M: Sync,
impl<T, M> Unpin for IoDelegate<T, M> where
M: Unpin,
M: Unpin,
impl<T, M = ()> !UnwindSafe for IoDelegate<T, M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,