pub struct Iob(/* private fields */);Expand description
An object representing a Zircon IOBuffer.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
Source§impl Iob
impl Iob
Sourcepub fn raw_handle(&self) -> zx_handle_t
pub fn raw_handle(&self) -> zx_handle_t
Return the handle’s integer value.
Sourcepub fn into_raw(self) -> zx_handle_t
pub fn into_raw(self) -> zx_handle_t
Return the raw handle’s integer value without closing it when self is dropped.
Sourcepub fn as_handle_ref(&self) -> HandleRef<'_>
pub fn as_handle_ref(&self) -> HandleRef<'_>
Returns a HandleRef referring to this handle.
Sourcepub fn duplicate(&self, rights: Rights) -> Result<Self, Status>
pub fn duplicate(&self, rights: Rights) -> Result<Self, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub fn replace(self, rights: Rights) -> Result<Self, Status>
pub fn replace(self, rights: Rights) -> Result<Self, Status>
Wraps the
zx_handle_replace
syscall.
Sourcepub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
Sourcepub fn wait_one(
&self,
signals: Signals,
deadline: MonotonicInstant,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: MonotonicInstant, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
Sourcepub fn wait_async(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Wraps the
zx_object_wait_async
syscall.
Sourcepub fn get_name(&self) -> Result<Name, Status>
pub fn get_name(&self) -> Result<Name, Status>
Wraps a call to the
zx_object_get_property
syscall for the ZX_PROP_NAME property.
Sourcepub fn set_name(&self, name: &Name) -> Result<(), Status>
pub fn set_name(&self, name: &Name) -> Result<(), Status>
Wraps a call to the
zx_object_set_property
syscall for the ZX_PROP_NAME property.
Sourcepub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
Sourcepub fn count_info(&self) -> Result<HandleCountInfo, Status>
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
Source§impl Iob
impl Iob
Sourcepub fn create(
_options: IobOptions,
regions: &[IobRegion<'_>],
) -> Result<(Iob, Iob), Status>
pub fn create( _options: IobOptions, regions: &[IobRegion<'_>], ) -> Result<(Iob, Iob), Status>
Creates an IOBuffer.
Wraps the zx_iob_create syscall.
Sourcepub fn write(
&self,
options: IobWriteOptions,
region_index: u32,
data: &[u8],
) -> Result<(), Status>
pub fn write( &self, options: IobWriteOptions, region_index: u32, data: &[u8], ) -> Result<(), Status>
Performs a mediated write to an IOBuffer region.
Wraps the zx_iob_writev syscall.
Sourcepub fn writev(
&self,
_options: IobWriteOptions,
region_index: u32,
iovecs: &[IobIoSlice<'_>],
) -> Result<(), Status>
pub fn writev( &self, _options: IobWriteOptions, region_index: u32, iovecs: &[IobIoSlice<'_>], ) -> Result<(), Status>
Performs a mediated write (with vectors) to an IOBuffer region.
Wraps the
zx_stream_writev
syscall.
Trait Implementations§
Source§impl AsHandleRef for Iob
impl AsHandleRef for Iob
Source§fn as_handle_ref(&self) -> HandleRef<'_>
fn as_handle_ref(&self) -> HandleRef<'_>
object_wait_many.