Trait r3_core::kernel::timer::TimerHandle
source · pub unsafe trait TimerHandle {
type System: KernelTimer;
// Required methods
unsafe fn from_id(id: <Self::System as KernelTimer>::RawTimerId) -> Self;
fn id(&self) -> <Self::System as KernelTimer>::RawTimerId;
fn borrow(&self) -> TimerRef<'_, Self::System>;
}
Expand description
The trait for safe wrappers of System::
RawTimerId
, i.e.,
Timer
and TimerRef
.
Required Associated Types§
sourcetype System: KernelTimer
type System: KernelTimer
The system type this object pertains to.
Required Methods§
sourceunsafe fn from_id(id: <Self::System as KernelTimer>::RawTimerId) -> Self
unsafe fn from_id(id: <Self::System as KernelTimer>::RawTimerId) -> Self
Construct a Timer
from RawTimerId
.
Safety
This function is marked as unsafe
to prevent safe code from
compromising object safety.
sourcefn id(&self) -> <Self::System as KernelTimer>::RawTimerId
fn id(&self) -> <Self::System as KernelTimer>::RawTimerId
Get the raw RawTimerId
value representing this object.