Trait r3::kernel::traits::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§

source

type System: KernelTimer

The system type this object pertains to.

Required Methods§

source

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.

source

fn id(&self) -> <Self::System as KernelTimer>::RawTimerId

Get the raw RawTimerId value representing this object.

source

fn borrow(&self) -> TimerRef<'_, Self::System>

Borrow self as TimerRef.

Implementors§

source§

impl<System> TimerHandle for Timer<System>where System: NotSupportedYet,

§

type System = System

source§

impl<System> TimerHandle for TimerRef<'_, System>where System: KernelTimer,

§

type System = System