pub struct TimerCycle {
pub name: String,
pub duration: usize,
}
Expand description
The timer cycle.
A cycle is a step in the timer lifetime, represented by a name and a duration.
Fields§
§name: String
The name of the timer cycle.
duration: usize
The duration of the timer cycle.
This field has two meanings, depending on where it is used. From the config point of view, the duration represents the total duration of the cycle. From the timer point of view, the duration represents the amount of time remaining before the cycle ends.
Implementations§
Trait Implementations§
Source§impl Clone for TimerCycle
impl Clone for TimerCycle
Source§fn clone(&self) -> TimerCycle
fn clone(&self) -> TimerCycle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TimerCycle
impl Debug for TimerCycle
Source§impl Default for TimerCycle
impl Default for TimerCycle
Source§fn default() -> TimerCycle
fn default() -> TimerCycle
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TimerCycle
impl<'de> Deserialize<'de> for TimerCycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TimerCycle
impl PartialEq for TimerCycle
Source§impl Serialize for TimerCycle
impl Serialize for TimerCycle
impl Eq for TimerCycle
impl StructuralPartialEq for TimerCycle
Auto Trait Implementations§
impl Freeze for TimerCycle
impl RefUnwindSafe for TimerCycle
impl Send for TimerCycle
impl Sync for TimerCycle
impl Unpin for TimerCycle
impl UnwindSafe for TimerCycle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more