Skip to main content

TaskConfig

Struct TaskConfig 

Source
pub struct TaskConfig<M = ()> {
    pub metadata: M,
    pub capture_panic_backtrace: bool,
}
Expand description

用户可选创建配置;调度(Schedule)和队列链接能力由原运行时决定。

Fields§

§metadata: M

固定类型的附加数据;读写经其自身线程安全(thread-safe)接口。

§capture_panic_backtrace: bool

是否允许捕获本任务恐慌(panic)起点信息,默认false。

Implementations§

Source§

impl<M> TaskConfig<M>

Source

pub fn new(metadata: M) -> TaskConfig<M>

Trait Implementations§

Source§

impl<M> Default for TaskConfig<M>
where M: Default,

Source§

fn default() -> TaskConfig<M>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<M> Forget for TaskConfig<M>

§

impl<M> Freeze for TaskConfig<M>
where M: Freeze,

§

impl<M> Move for TaskConfig<M>

§

impl<M> RefUnwindSafe for TaskConfig<M>
where M: RefUnwindSafe,

§

impl<M> Send for TaskConfig<M>
where M: Send,

§

impl<M> Sync for TaskConfig<M>
where M: Sync,

§

impl<M> Unpin for TaskConfig<M>
where M: Unpin,

§

impl<M> UnsafeUnpin for TaskConfig<M>
where M: UnsafeUnpin,

§

impl<M> UnwindSafe for TaskConfig<M>
where M: UnwindSafe,

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.