pub trait OrderedTimerDequeMode:
Debug
+ Display
+ Ord
+ PartialOrd
+ Eq
+ PartialEq {
const IS_ONCE: bool;
// Required methods
fn validate_time(&self, cmp: AbsoluteTime) -> TimerResult<()>;
fn get_absolut_timeout(&self) -> AbsoluteTime;
fn postpone(&mut self, posp_time: RelativeTime) -> TimerResult<()>;
// Provided method
fn advance_timeout(&mut self) { ... }
}Expand description
A trait which is implemented by the structs which define the operation mode of the deque.
At the moment for: DequeOnce and DequePeriodic.
Required Associated Constants§
Required Methods§
Sourcefn validate_time(&self, cmp: AbsoluteTime) -> TimerResult<()>
fn validate_time(&self, cmp: AbsoluteTime) -> TimerResult<()>
Checks the current instance against the provided cmp AbsoluteTime.
It is expected that the current instance’s timeout value is actual and
haven’t outlive the cmp already. if it does the error:
TimerErrorType::Expired should be returned. Or any other error
if it is required.
Sourcefn get_absolut_timeout(&self) -> AbsoluteTime
fn get_absolut_timeout(&self) -> AbsoluteTime
Returns the absolute timeout for the instance of the deque.
Sourcefn postpone(&mut self, posp_time: RelativeTime) -> TimerResult<()>
fn postpone(&mut self, posp_time: RelativeTime) -> TimerResult<()>
Postpones the time by the relative offset post_time. May return error
(if required) if the absolut timeout value overflows.
May return TimerErrorType::TicketInstanceGone if ticket was invalidated.
Provided Methods§
Sourcefn advance_timeout(&mut self)
fn advance_timeout(&mut self)
Updates the timeout when the deque works in periodic mode. By fedault it does nothing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.