Skip to main content

Handle

Struct Handle 

Source
pub struct Handle { /* private fields */ }
Available on crate feature full only.
Expand description

A handle representing a userspace resource within the kernel.

Implementations§

Source§

impl Handle

Source

pub fn new(endpoint: TaskRef, oid: u32) -> Arc<Self> ⓘ

Creates a new Handle object pointing to the passed server and object ID, and supporting the passed list of protocols.

Source

pub fn new_system(koid: TaggedNonNull<u64>) -> Arc<Self> ⓘ

Creates a new Handle object pointing to the passed system service.

Source

pub fn oid(&self) -> u32

Returns the object ID for this handle.

Source

pub fn koid(&self) -> TaggedNonNull<u64>

Returns the object ID for a system handle.

Source

pub fn target(&self) -> TaskRef

Returns the target task for this handle.

Source

pub fn is_system(&self) -> bool

Returns whether the handle is backed by the kernel or a userspace service.

Trait Implementations§

Source§

impl Debug for Handle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Handle

§

impl RefUnwindSafe for Handle

§

impl Send for Handle

§

impl Sync for Handle

§

impl Unpin for Handle

§

impl UnsafeUnpin for Handle

§

impl UnwindSafe for Handle

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.