Skip to main content

SpawnError

Enum SpawnError 

pub enum SpawnError<F: Future, N: TaskNotifier, M: Send + Sync + 'static = (), K: OutputMode = SendOutput> {
    Create(CreateError<F, M>),
    Submit {
        error: SubmitError,
        handle: TaskHandle<N, F::Output, M, K>,
    },
}
Expand description

便利派发(dispatch)失败时明确区分尚未创建和已经创建。

Variants§

§

Create(CreateError<F, M>)

§

Submit

Fields

§handle: TaskHandle<N, F::Output, M, K>

Trait Implementations§

§

impl<F: Future, N: TaskNotifier, M: Send + Sync + 'static, K: OutputMode> Debug for SpawnError<F, N, M, K>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F, N, M = (), K = SendOutput> !RefUnwindSafe for SpawnError<F, N, M, K>

§

impl<F, N, M = (), K = SendOutput> !UnwindSafe for SpawnError<F, N, M, K>

§

impl<F, N, M, K> Forget for SpawnError<F, N, M, K>

§

impl<F, N, M, K> Freeze for SpawnError<F, N, M, K>
where CreateError<F, M>: Freeze, TaskHandle<N, <F as Future>::Output, M, K>: Freeze,

§

impl<F, N, M, K> Move for SpawnError<F, N, M, K>

§

impl<F, N, M, K> Send for SpawnError<F, N, M, K>
where CreateError<F, M>: Send, TaskHandle<N, <F as Future>::Output, M, K>: Send,

§

impl<F, N, M, K> Sync for SpawnError<F, N, M, K>
where CreateError<F, M>: Sync, TaskHandle<N, <F as Future>::Output, M, K>: Sync,

§

impl<F, N, M, K> Unpin for SpawnError<F, N, M, K>
where CreateError<F, M>: Unpin, TaskHandle<N, <F as Future>::Output, M, K>: Unpin,

§

impl<F, N, M, K> UnsafeUnpin for SpawnError<F, N, M, K>
where CreateError<F, M>: UnsafeUnpin, TaskHandle<N, <F as Future>::Output, M, K>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OpaqueAttachment for T
where T: Send + Sync + 'static,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.