pub struct ProgressDispatcher { /* private fields */ }Available on crate feature
client only.Expand description
A dispatcher for progress notifications.
Implementations§
Source§impl ProgressDispatcher
impl ProgressDispatcher
pub fn new() -> Self
Sourcepub async fn handle_notification(&self, notification: ProgressNotificationParam)
pub async fn handle_notification(&self, notification: ProgressNotificationParam)
Handle a progress notification by sending it to the appropriate subscriber
Sourcepub async fn subscribe(
&self,
progress_token: ProgressToken,
) -> ProgressSubscriber
pub async fn subscribe( &self, progress_token: ProgressToken, ) -> ProgressSubscriber
Subscribe to progress notifications for a specific token.
If you drop the returned ProgressSubscriber, it will automatically unsubscribe from notifications for that token.
Sourcepub async fn unsubscribe(&self, token: &ProgressToken)
pub async fn unsubscribe(&self, token: &ProgressToken)
Unsubscribe from progress notifications for a specific token.
Trait Implementations§
Source§impl Clone for ProgressDispatcher
impl Clone for ProgressDispatcher
Source§fn clone(&self) -> ProgressDispatcher
fn clone(&self) -> ProgressDispatcher
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 ProgressDispatcher
impl Debug for ProgressDispatcher
Source§impl Default for ProgressDispatcher
impl Default for ProgressDispatcher
Source§fn default() -> ProgressDispatcher
fn default() -> ProgressDispatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProgressDispatcher
impl !RefUnwindSafe for ProgressDispatcher
impl Send for ProgressDispatcher
impl Sync for ProgressDispatcher
impl Unpin for ProgressDispatcher
impl UnsafeUnpin for ProgressDispatcher
impl !UnwindSafe for ProgressDispatcher
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