#[repr(transparent)]pub struct TimerRef<'a, 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: KernelTimer> TimerRef<'static, System>
impl<System: KernelTimer> TimerRef<'static, System>
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: KernelTimer> Clone for TimerRef<'_, System>
impl<System: KernelTimer> Clone for TimerRef<'_, System>
source§impl<System: KernelTimer> Debug for TimerRef<'_, System>
impl<System: KernelTimer> Debug for TimerRef<'_, System>
source§impl<System: KernelTimer> Hash for TimerRef<'_, System>
impl<System: KernelTimer> Hash for TimerRef<'_, System>
source§impl<System: NotSupportedYet> PartialEq<Timer<System>> for TimerRef<'_, System>
impl<System: NotSupportedYet> PartialEq<Timer<System>> for TimerRef<'_, System>
source§impl<System: NotSupportedYet> PartialEq<TimerRef<'_, System>> for Timer<System>
impl<System: NotSupportedYet> PartialEq<TimerRef<'_, System>> for Timer<System>
source§impl<System: KernelTimer> PartialEq<TimerRef<'_, System>> for TimerRef<'_, System>
impl<System: KernelTimer> PartialEq<TimerRef<'_, System>> for TimerRef<'_, System>
source§impl<System: KernelTimer> TimerHandle for TimerRef<'_, System>
impl<System: KernelTimer> TimerHandle for TimerRef<'_, System>
source§const unsafe fn from_id(id: <System as KernelTimer>::RawTimerId) -> Self
const unsafe fn from_id(id: <System as KernelTimer>::RawTimerId) -> Self
source§const fn id(&self) -> System::RawTimerId
const fn id(&self) -> System::RawTimerId
Get the raw
RawTimerId
value representing this object.impl<System: KernelTimer> Copy for TimerRef<'_, System>
impl<System: KernelTimer> Eq for TimerRef<'_, System>
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