[−][src]Enum cannyls::deadline::Deadline
各種操作のデッドラインを表現するためのオブジェクト.
注意
ここでの"デッドライン"とは、厳密な上限ではなく、 「可能であれば、この時間までに実行してほしい」というヒントに過ぎないことは注意が必要。
そのため、ハードリミットというよりは、操作間の優先順位を示すためのもの、という意味合いが強い (e.g., リソースに余裕がない場合には、デッドラインが近いものから優先的に処理される)。
なお、デッドラインが等しい場合には、先にデバイスに到着したリクエストの方が優先される.
Variants
可能な限り早急に処理して欲しいリクエストに指定するデッドライン.
Within(Duration::from_secs(0))
よりも優先度は高い.
Within(Duration)
指定された時間以内での実行を期待するリクエストに指定するデッドライン.
このデッドライン指定は、デバイスにリクエストが届いたタイミングで、
絶対時刻(i.e., SystemTime::now() + 指定尺
)に変換され、
その値を元にリクエストのスケジューリングが行われる.
そのため「14:10に発行されたWithin(Duration::from_secs(5))
のリクエスト」と
「14:00に発行されたWithin(Duration::from_secs(10)
のリクエスト」では、
後者の方が優先度が高く、より早く実行されることとなる.
実行がいくら遅延されても問題がないようなリクエストに指定するデッドライン(デフォルト値).
Immediate
ないしWithin(_)
が指定されたリクエストが一つでもある間は、そちらが優先される.
Trait Implementations
impl Clone for Deadline
[src]
impl Copy for Deadline
[src]
impl Debug for Deadline
[src]
impl Default for Deadline
[src]
impl Eq for Deadline
[src]
impl Hash for Deadline
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Deadline
[src]
fn cmp(&self, other: &Deadline) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Deadline> for Deadline
[src]
impl PartialOrd<Deadline> for Deadline
[src]
fn partial_cmp(&self, other: &Deadline) -> Option<Ordering>
[src]
fn lt(&self, other: &Deadline) -> bool
[src]
fn le(&self, other: &Deadline) -> bool
[src]
fn gt(&self, other: &Deadline) -> bool
[src]
fn ge(&self, other: &Deadline) -> bool
[src]
impl StructuralEq for Deadline
[src]
impl StructuralPartialEq for Deadline
[src]
Auto Trait Implementations
impl RefUnwindSafe for Deadline
impl Send for Deadline
impl Sync for Deadline
impl Unpin for Deadline
impl UnwindSafe for Deadline
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,