Skip to main content

TimerEntry

Struct TimerEntry 

pub struct TimerEntry<K: Send + Sync + 'static, R: AsRef<TimerRegistration<K>>> { /* private fields */ }
Expand description

来源保存原任务(Task)或计时信号,不克隆、不创建新的Task。 普通释放(drop)结束本登记的交付责任,按已有取消事实区分结果,原任务(Task)沿自身规则退出。 来源移除不表示原异步计算(Future)已完成合法析构,也不执行或重新接纳业务。

Implementations§

§

impl<K: Send + Sync + 'static, R: AsRef<TimerRegistration<K>>> TimerEntry<K, R>

pub fn into_due(self) -> Option<Runnable>

仅在来源确认真实到期并交付后使用;信号返回None,业务项交出同一Runnable。 不接纳、不直接poll、不承诺原Future已完成。

Trait Implementations§

§

impl<K: Send + Sync + 'static, R: AsRef<TimerRegistration<K>>> Drop for TimerEntry<K, R>

§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<K, R> !RefUnwindSafe for TimerEntry<K, R>

§

impl<K, R> !UnwindSafe for TimerEntry<K, R>

§

impl<K, R> Forget for TimerEntry<K, R>

§

impl<K, R> Freeze for TimerEntry<K, R>
where R: Freeze, PhantomData<fn() -> K>: Freeze,

§

impl<K, R> Move for TimerEntry<K, R>

§

impl<K, R> Send for TimerEntry<K, R>
where R: Send, PhantomData<fn() -> K>: Send,

§

impl<K, R> Sync for TimerEntry<K, R>
where R: Sync, PhantomData<fn() -> K>: Sync,

§

impl<K, R> Unpin for TimerEntry<K, R>
where R: Unpin, PhantomData<fn() -> K>: Unpin,

§

impl<K, R> UnsafeUnpin for TimerEntry<K, R>

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.