pub struct TimerRef<'a, System>(_, _)
where
System: KernelTimer;
Expand description
Represents a single borrowed timer in a system.
This type is ABI-compatible with System::
RawTimerId
. It’s
logically equivalent to &'a Timer
but instead stores RawTimerId
directly.
See Timer
for the owned counterpart and the description
of this kernel object.
See TimerMethods
for the operations provided by this handle
type.
Implementations§
source§impl<System> TimerRef<'static, System>where
System: KernelTimer,
impl<System> TimerRef<'static, System>where System: KernelTimer,
sourcepub const fn define() -> TimerDefiner<System>
pub const fn define() -> TimerDefiner<System>
Construct a TimerDefiner
to define a timer in a
configuration function.
Trait Implementations§
source§impl<System> Clone for TimerRef<'_, System>where
System: KernelTimer,
impl<System> Clone for TimerRef<'_, System>where System: KernelTimer,
source§impl<System> Debug for TimerRef<'_, System>where
System: KernelTimer,
impl<System> Debug for TimerRef<'_, System>where System: KernelTimer,
source§impl<System> Hash for TimerRef<'_, System>where
System: KernelTimer,
impl<System> Hash for TimerRef<'_, System>where System: KernelTimer,
source§impl<System> PartialEq<Timer<System>> for TimerRef<'_, System>where
System: NotSupportedYet,
impl<System> PartialEq<Timer<System>> for TimerRef<'_, System>where System: NotSupportedYet,
source§impl<System> PartialEq<TimerRef<'_, System>> for Timer<System>where
System: NotSupportedYet,
impl<System> PartialEq<TimerRef<'_, System>> for Timer<System>where System: NotSupportedYet,
source§impl<System> PartialEq<TimerRef<'_, System>> for TimerRef<'_, System>where
System: KernelTimer,
impl<System> PartialEq<TimerRef<'_, System>> for TimerRef<'_, System>where System: KernelTimer,
source§impl<System> TimerHandle for TimerRef<'_, System>where
System: KernelTimer,
impl<System> TimerHandle for TimerRef<'_, System>where System: KernelTimer,
source§const unsafe fn from_id(
id: <System as KernelTimer>::RawTimerId
) -> TimerRef<'_, System>
const unsafe fn from_id( id: <System as KernelTimer>::RawTimerId ) -> TimerRef<'_, System>
source§const fn id(&self) -> <System as KernelTimer>::RawTimerId
const fn id(&self) -> <System as KernelTimer>::RawTimerId
Get the raw
RawTimerId
value representing this object.impl<System> Copy for TimerRef<'_, System>where System: KernelTimer,
impl<System> Eq for TimerRef<'_, System>where System: KernelTimer,
Auto Trait Implementations§
impl<'a, System> RefUnwindSafe for TimerRef<'a, System>where <System as KernelTimer>::RawTimerId: RefUnwindSafe,
impl<'a, System> Send for TimerRef<'a, System>
impl<'a, System> Sync for TimerRef<'a, System>
impl<'a, System> Unpin for TimerRef<'a, System>where <System as KernelTimer>::RawTimerId: Unpin,
impl<'a, System> UnwindSafe for TimerRef<'a, System>where <System as KernelTimer>::RawTimerId: UnwindSafe,
Blanket Implementations§
source§impl<T> TimerMethods for Twhere
T: TimerHandle,
impl<T> TimerMethods for Twhere T: TimerHandle,
source§fn start(&self) -> Result<(), StartTimerError>
fn start(&self) -> Result<(), StartTimerError>
Start the timer (transition it into the Active state). Read more
source§fn stop(&self) -> Result<(), StopTimerError>
fn stop(&self) -> Result<(), StopTimerError>
Stop the timer (transition it into the Dormant state). Read more
source§fn set_delay(&self, delay: Option<Duration>) -> Result<(), SetTimerDelayError>
fn set_delay(&self, delay: Option<Duration>) -> Result<(), SetTimerDelayError>
Set the duration before the next tick. Read more
source§fn set_period(
&self,
period: Option<Duration>
) -> Result<(), SetTimerPeriodError>
fn set_period( &self, period: Option<Duration> ) -> Result<(), SetTimerPeriodError>
Set the timer period, which is a quantity to be added to the timer’s
absolute arrival time on every tick. Read more