pub struct SpawnError<F>(pub F);
Expand description
Error returned when a task cannot be spawned
This error is returned from Spawner
’s methods when the executor has been
dropped and the task cannot be spawned. The error contains the task that
could not be spawned, allowing the caller to reuse the task.
SpawnError
implements Debug
for all F
regardless of whether F
does.
This allows the use of unwrap
and expect
on Result<_, SpawnError<F>>
.
Tuple Fields§
§0: F
Trait Implementations§
Source§impl<F: Clone> Clone for SpawnError<F>
impl<F: Clone> Clone for SpawnError<F>
Source§fn clone(&self) -> SpawnError<F>
fn clone(&self) -> SpawnError<F>
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<F> Debug for SpawnError<F>
impl<F> Debug for SpawnError<F>
Source§impl<F: Default> Default for SpawnError<F>
impl<F: Default> Default for SpawnError<F>
Source§fn default() -> SpawnError<F>
fn default() -> SpawnError<F>
Returns the “default value” for a type. Read more
Source§impl<F: Hash> Hash for SpawnError<F>
impl<F: Hash> Hash for SpawnError<F>
Source§impl<F: Ord> Ord for SpawnError<F>
impl<F: Ord> Ord for SpawnError<F>
Source§fn cmp(&self, other: &SpawnError<F>) -> Ordering
fn cmp(&self, other: &SpawnError<F>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F: PartialEq> PartialEq for SpawnError<F>
impl<F: PartialEq> PartialEq for SpawnError<F>
Source§impl<F: PartialOrd> PartialOrd for SpawnError<F>
impl<F: PartialOrd> PartialOrd for SpawnError<F>
impl<F: Copy> Copy for SpawnError<F>
impl<F: Eq> Eq for SpawnError<F>
impl<F> StructuralPartialEq for SpawnError<F>
Auto Trait Implementations§
impl<F> Freeze for SpawnError<F>where
F: Freeze,
impl<F> RefUnwindSafe for SpawnError<F>where
F: RefUnwindSafe,
impl<F> Send for SpawnError<F>where
F: Send,
impl<F> Sync for SpawnError<F>where
F: Sync,
impl<F> Unpin for SpawnError<F>where
F: Unpin,
impl<F> UnwindSafe for SpawnError<F>where
F: UnwindSafe,
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