Struct zircon_object::dev::Resource[][src]

pub struct Resource { /* fields omitted */ }

Address space rights and accounting.

Implementations

impl Resource[src]

pub fn create(
    name: &str,
    kind: ResourceKind,
    addr: usize,
    len: usize,
    flags: ResourceFlags
) -> Arc<Self>
[src]

Create a new Resource.

pub fn validate(&self, kind: ResourceKind) -> ZxResult[src]

Validate the resource is the given kind or it is the root resource.

pub fn validate_ranged_resource(
    &self,
    kind: ResourceKind,
    addr: usize,
    len: usize
) -> ZxResult
[src]

Validate the resource is the given kind or it is the root resource, and [addr, addr+len] is within the range of the resource.

pub fn check_exclusive(&self, flags: ResourceFlags) -> ZxResult[src]

Returns Err(ZxError::INVALID_ARGS) if the resource is not the root resource, and either it’s flags or parameter flags contains ResourceFlags::EXCLUSIVE.

pub fn get_info(&self) -> ResourceInfo[src]

Get information of the resource.

Trait Implementations

impl Debug for Resource[src]

impl KernelObject for Resource[src]

Auto Trait Implementations

impl !RefUnwindSafe for Resource

impl Send for Resource

impl Sync for Resource

impl Unpin for Resource

impl !UnwindSafe for Resource

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.