Struct thin_jsonrpc_client::ServerNotifications
source · pub struct ServerNotifications(_);Expand description
A struct representing messages from the server.
Implementations§
source§impl ServerNotifications
impl ServerNotifications
sourcepub fn all(&self) -> ServerNotificationStream
pub fn all(&self) -> ServerNotificationStream
Return all valid notifications.
sourcepub fn with_filter<F>(&self, filter_fn: F) -> ServerNotificationStreamwhere
F: FnMut(&Response<'_>) -> bool + Send + 'static,
pub fn with_filter<F>(&self, filter_fn: F) -> ServerNotificationStreamwhere F: FnMut(&Response<'_>) -> bool + Send + 'static,
Filter the incoming stream of notifications and only return matching messages. The filter is applied early on and can save allocations in the case that nothing is interested in a particular message.
Auto Trait Implementations§
impl RefUnwindSafe for ServerNotifications
impl Send for ServerNotifications
impl Sync for ServerNotifications
impl Unpin for ServerNotifications
impl UnwindSafe for ServerNotifications
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more