Trait r3::kernel::task::TaskHandle

source ·
pub unsafe trait TaskHandle {
    type System: KernelBase;

    // Required methods
    unsafe fn from_id(id: <Self::System as KernelBase>::RawTaskId) -> Self;
    fn id(&self) -> <Self::System as KernelBase>::RawTaskId;
    fn borrow(&self) -> TaskRef<'_, Self::System>;
}
Expand description

The trait for safe wrappers of System::RawTaskId, i.e., Task and TaskRef.

Required Associated Types§

source

type System: KernelBase

The system type this object pertains to.

Required Methods§

source

unsafe fn from_id(id: <Self::System as KernelBase>::RawTaskId) -> Self

Construct a Task from RawTaskId.

Safety

This function is marked as unsafe to prevent safe code from compromising object safety.

source

fn id(&self) -> <Self::System as KernelBase>::RawTaskId

Get the raw RawTaskId value representing this object.

source

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

Borrow self as TaskRef.

Implementors§

source§

impl<System> TaskHandle for LocalTask<System>where System: KernelBase,

§

type System = System

source§

impl<System> TaskHandle for Task<System>where System: NotSupportedYet,

§

type System = System

source§

impl<System> TaskHandle for TaskRef<'_, System>where System: KernelBase,

§

type System = System