Struct jsonrpc_pubsub::typed::Subscriber [−][src]
New PUB-SUB subscriber.
Implementations
impl<T, E> Subscriber<T, E>
[src]
pub fn new(subscriber: Subscriber) -> Self
[src]
Wrap non-typed subscriber.
pub fn new_test<M: Into<String>>(
method: M
) -> (Self, Receiver<Result<SubscriptionId, Error>>, Receiver<String>)
[src]
method: M
) -> (Self, Receiver<Result<SubscriptionId, Error>>, Receiver<String>)
Create new subscriber for tests.
pub fn reject(self, error: Error) -> Result<(), ()>
[src]
Reject subscription with given error.
pub fn reject_async(self, error: Error) -> impl Future<Item = (), Error = ()>
[src]
Reject subscription with given error.
The returned future will resolve when the response is sent to the client.
pub fn assign_id(self, id: SubscriptionId) -> Result<Sink<T, E>, ()>
[src]
Assign id to this subscriber.
This method consumes Subscriber
and returns Sink
if the connection is still open or error otherwise.
pub fn assign_id_async(
self,
id: SubscriptionId
) -> impl Future<Item = Sink<T, E>, Error = ()>
[src]
self,
id: SubscriptionId
) -> impl Future<Item = Sink<T, E>, Error = ()>
Assign id to this subscriber.
This method consumes Subscriber
and resolves to Sink
if the connection is still open and the id has been sent or to error otherwise.
Trait Implementations
impl<T: Debug, E: Debug> Debug for Subscriber<T, E>
[src]
Auto Trait Implementations
impl<T, E = Error> !RefUnwindSafe for Subscriber<T, E>
impl<T, E> Send for Subscriber<T, E> where
E: Send,
T: Send,
E: Send,
T: Send,
impl<T, E> Sync for Subscriber<T, E> where
E: Sync,
T: Sync,
E: Sync,
T: Sync,
impl<T, E> Unpin for Subscriber<T, E> where
E: Unpin,
T: Unpin,
E: Unpin,
T: Unpin,
impl<T, E = Error> !UnwindSafe for Subscriber<T, E>
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,
pub 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<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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,