pub struct EventSender { /* private fields */ }Implementations§
Source§impl EventSender
Client for progress notifications.
impl EventSender
Client for progress notifications.
For most event types, the client can be configured to either send notifications or requests that can have a response.
pub fn new(client: Sender<ProviderMessage>, mask: EventMask) -> Self
pub fn channel( capacity: usize, mask: EventMask, ) -> (Self, Receiver<ProviderMessage>)
Sourcepub async fn client_connected(
&self,
f: impl Fn() -> ClientConnected,
) -> ClientResult
pub async fn client_connected( &self, f: impl Fn() -> ClientConnected, ) -> ClientResult
A new client has been connected.
Sourcepub async fn connection_closed(
&self,
f: impl Fn() -> ConnectionClosed,
) -> ClientResult
pub async fn connection_closed( &self, f: impl Fn() -> ConnectionClosed, ) -> ClientResult
A connection has been closed.
Trait Implementations§
Source§impl Clone for EventSender
impl Clone for EventSender
Source§fn clone(&self) -> EventSender
fn clone(&self) -> EventSender
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventSender
impl Debug for EventSender
Source§impl Default for EventSender
impl Default for EventSender
Source§fn default() -> EventSender
fn default() -> EventSender
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventSender
impl !RefUnwindSafe for EventSender
impl Send for EventSender
impl Sync for EventSender
impl Unpin for EventSender
impl UnsafeUnpin for EventSender
impl !UnwindSafe for EventSender
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more