pub struct TimerError { /* private fields */ }Expand description
Represents timer-related failures.
Implementations§
Source§impl TimerError
impl TimerError
Sourcepub fn invalid_parameter(message: impl Into<String>) -> Self
pub fn invalid_parameter(message: impl Into<String>) -> Self
Creates an invalid parameter error.
Sourcepub fn not_running() -> Self
pub fn not_running() -> Self
Creates an error for operations that require a running timer.
Sourcepub fn not_paused() -> Self
pub fn not_paused() -> Self
Creates an error for operations that require a paused timer.
Sourcepub fn reentrant_operation(message: impl Into<String>) -> Self
pub fn reentrant_operation(message: impl Into<String>) -> Self
Creates an error for operations that cannot safely run from the active callback.
Sourcepub fn callback_timed_out(timeout: Duration) -> Self
pub fn callback_timed_out(timeout: Duration) -> Self
Creates an error for callback timeout expiration.
Sourcepub fn callback_failed(message: impl Into<String>) -> Self
pub fn callback_failed(message: impl Into<String>) -> Self
Creates an error for callback execution failures.
Sourcepub fn is_invalid_parameter(&self) -> bool
pub fn is_invalid_parameter(&self) -> bool
Returns true when the error is an invalid parameter error.
Sourcepub fn invalid_parameter_message(&self) -> Option<&str>
pub fn invalid_parameter_message(&self) -> Option<&str>
Returns the invalid parameter message when available.
Sourcepub fn is_not_running(&self) -> bool
pub fn is_not_running(&self) -> bool
Returns true when the error indicates the timer was not running.
Sourcepub fn is_not_paused(&self) -> bool
pub fn is_not_paused(&self) -> bool
Returns true when the error indicates the timer was not paused.
Sourcepub fn is_reentrant_operation(&self) -> bool
pub fn is_reentrant_operation(&self) -> bool
Returns true when the error indicates a reentrant callback operation.
Sourcepub fn reentrant_operation_message(&self) -> Option<&str>
pub fn reentrant_operation_message(&self) -> Option<&str>
Returns the reentrant-operation message when available.
Sourcepub fn is_callback_failed(&self) -> bool
pub fn is_callback_failed(&self) -> bool
Returns true when the error indicates callback execution failed.
Sourcepub fn is_callback_timed_out(&self) -> bool
pub fn is_callback_timed_out(&self) -> bool
Returns true when the error indicates callback execution timed out.
Sourcepub fn callback_timeout(&self) -> Option<Duration>
pub fn callback_timeout(&self) -> Option<Duration>
Returns the callback timeout when available.
Sourcepub fn callback_failure_message(&self) -> Option<&str>
pub fn callback_failure_message(&self) -> Option<&str>
Returns the callback failure message when available.
Trait Implementations§
Source§impl Clone for TimerError
impl Clone for TimerError
Source§fn clone(&self) -> TimerError
fn clone(&self) -> TimerError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more