pub struct Handle<S, R>{ /* private fields */ }
Expand description
A handle for the Flower
Implementations§
Source§impl<S, R> Handle<S, R>
impl<S, R> Handle<S, R>
Sourcepub fn should_cancel(&self) -> bool
pub fn should_cancel(&self) -> bool
Check if the current Flower
should be canceled
Sourcepub async fn send_async(&self, s: S)
pub async fn send_async(&self, s: S)
Send current progress value asynchronously.
Sourcepub fn set_result(&self, r: Result<R, Box<dyn Error>>)
pub fn set_result(&self, r: Result<R, Box<dyn Error>>)
Set Result
value with verboser error message.
(for more easier to keep in track with the real cause of the error)
Sourcepub fn set_result_no_verbose(&self, r: Result<R, Box<dyn Error>>)
pub fn set_result_no_verbose(&self, r: Result<R, Box<dyn Error>>)
Set Result
value with no verbose (simpler error message)
Sourcepub fn error_verbose(&self, e: Box<dyn Error>)
pub fn error_verbose(&self, e: Box<dyn Error>)
Set the Err
value of the Result
with more verboser error message.
Trait Implementations§
Auto Trait Implementations§
impl<S, R> Freeze for Handle<S, R>
impl<S, R> RefUnwindSafe for Handle<S, R>
impl<S, R> Send for Handle<S, R>
impl<S, R> Sync for Handle<S, R>
impl<S, R> Unpin for Handle<S, R>
impl<S, R> UnwindSafe for Handle<S, R>
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