pub struct Fifo<R, W = R> { /* private fields */ }
Expand description
An I/O object representing a Fifo
.
Implementations§
Source§impl<R: FifoEntry, W: FifoEntry> Fifo<R, W>
impl<R: FifoEntry, W: FifoEntry> Fifo<R, W>
Sourcepub fn from_fifo(fifo: impl Into<Fifo<R, W>>) -> Self
pub fn from_fifo(fifo: impl Into<Fifo<R, W>>) -> Self
Creates a new Fifo
from a previously-created zx::Fifo
.
§Panics
If called on a thread that does not have a current async executor.
Trait Implementations§
Source§impl<R, W> AsHandleRef for Fifo<R, W>
impl<R, W> AsHandleRef for Fifo<R, W>
Source§fn as_handle_ref(&self) -> HandleRef<'_>
fn as_handle_ref(&self) -> HandleRef<'_>
Get a reference to the handle. One important use of such a reference is
for
object_wait_many
.Source§fn raw_handle(&self) -> u32
fn raw_handle(&self) -> u32
Interpret the reference as a raw handle (an integer type). Two distinct
handles will have different raw values (so it can perhaps be used as a
key in a data structure).
Source§fn signal_handle(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
fn signal_handle( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Set and clear userspace-accessible signal bits on an object. Wraps the
zx_object_signal
syscall.
Source§fn wait_handle(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> Result<Signals, Status>
fn wait_handle( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> Result<Signals, Status>
Waits on a handle. Wraps the
zx_object_wait_one
syscall.
Source§fn wait_async_handle(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
fn wait_async_handle( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Causes packet delivery on the given port when the object changes state and matches signals.
zx_object_wait_async
syscall.
Source§fn get_name(&self) -> Result<Name, Status>
fn get_name(&self) -> Result<Name, Status>
Get the Property::NAME property for this object. Read more
Source§fn set_name(&self, name: &Name) -> Result<(), Status>
fn set_name(&self, name: &Name) -> Result<(), Status>
Set the Property::NAME property for this object. Read more
Source§fn basic_info(&self) -> Result<HandleBasicInfo, Status>
fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
Source§fn count_info(&self) -> Result<HandleCountInfo, Status>
fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
Source§impl<R: FifoEntry, W: FifoEntry> FifoReadable<R> for Fifo<R, W>
impl<R: FifoEntry, W: FifoEntry> FifoReadable<R> for Fifo<R, W>
Source§fn read<B: ?Sized + FifoReadBuffer<R>>(
&self,
cx: &mut Context<'_>,
entries: &mut B,
) -> Poll<Result<usize, Status>>
fn read<B: ?Sized + FifoReadBuffer<R>>( &self, cx: &mut Context<'_>, entries: &mut B, ) -> Poll<Result<usize, Status>>
Reads entries from the fifo and registers this
Fifo
as needing a read
on receiving a zx::Status::SHOULD_WAIT
.Source§fn read_entries<'a, B: ?Sized + FifoReadBuffer<R>>(
&'a self,
entries: &'a mut B,
) -> ReadEntries<'a, Self, B, R> ⓘ
fn read_entries<'a, B: ?Sized + FifoReadBuffer<R>>( &'a self, entries: &'a mut B, ) -> ReadEntries<'a, Self, B, R> ⓘ
Creates a future that receives entries into
entries
. Read moreSource§impl<R: FifoEntry, W: FifoEntry> FifoWritable<W> for Fifo<R, W>
impl<R: FifoEntry, W: FifoEntry> FifoWritable<W> for Fifo<R, W>
Source§fn write<B: ?Sized + FifoWriteBuffer<W>>(
&self,
cx: &mut Context<'_>,
entries: &B,
) -> Poll<Result<usize, Status>>
fn write<B: ?Sized + FifoWriteBuffer<W>>( &self, cx: &mut Context<'_>, entries: &B, ) -> Poll<Result<usize, Status>>
Writes entries to the fifo and registers this
Fifo
as needing a write
on receiving a zx::Status::SHOULD_WAIT
. Read moreSource§fn write_entries<'a, B: ?Sized + FifoWriteBuffer<W>>(
&'a self,
entries: &'a B,
) -> WriteEntries<'a, Self, B, W> ⓘ
fn write_entries<'a, B: ?Sized + FifoWriteBuffer<W>>( &'a self, entries: &'a B, ) -> WriteEntries<'a, Self, B, W> ⓘ
Creates a future that transmits entries to be written. Read more
Auto Trait Implementations§
impl<R, W> Freeze for Fifo<R, W>
impl<R, W = R> !RefUnwindSafe for Fifo<R, W>
impl<R, W> Send for Fifo<R, W>
impl<R, W> Sync for Fifo<R, W>
impl<R, W> Unpin for Fifo<R, W>
impl<R, W = R> !UnwindSafe for Fifo<R, W>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more