Struct zircon_object::object::KObjectBase[][src]

pub struct KObjectBase {
    pub id: KoID,
    // some fields omitted
}

The base struct of a kernel object.

Fields

id: KoID

The object’s KoID.

Implementations

impl KObjectBase[src]

pub fn new() -> Self[src]

Create a new kernel object base.

pub fn with_signal(signal: Signal) -> Self[src]

Create a kernel object base with initial signal.

pub fn with_name(name: &str) -> Self[src]

Create a kernel object base with name.

pub fn with(name: &str, signal: Signal) -> Self[src]

Create a kernel object base with both signal and name

pub fn name(&self) -> String[src]

Get object’s name.

pub fn set_name(&self, name: &str)[src]

Set object’s name.

pub fn signal(&self) -> Signal[src]

Get the signal status.

pub fn signal_change(&self, clear: Signal, set: Signal)[src]

Change signal status: first clear then set indicated bits.

All signal callbacks will be called.

pub fn signal_set(&self, signal: Signal)[src]

Assert signal.

pub fn signal_clear(&self, signal: Signal)[src]

Deassert signal.

pub fn add_signal_callback(&self, callback: SignalHandler)[src]

Add callback for signal status changes.

The callback is a function of Fn(Signal) -> bool. It returns a bool indicating whether the handle process is over. If true, the function will never be called again.

Trait Implementations

impl Default for KObjectBase[src]

Auto Trait Implementations

impl !RefUnwindSafe for KObjectBase

impl Send for KObjectBase

impl Sync for KObjectBase

impl Unpin for KObjectBase

impl !UnwindSafe for KObjectBase

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.