Struct zircon_object::vm::Stream[][src]

pub struct Stream { /* fields omitted */ }

A readable, writable, seekable interface to some underlying storage

SYNOPSIS

A stream is an interface for reading and writing data to some underlying storage, typically a VMO.

Implementations

impl Stream[src]

pub fn create(vmo: Arc<VmObject>, seek: usize, options: u32) -> Arc<Self>[src]

Create a stream from a VMO

pub fn read(&self, data: &mut [u8]) -> ZxResult<usize>[src]

Read data from the stream at the current seek offset

pub fn read_at(&self, data: &mut [u8], offset: usize) -> ZxResult<usize>[src]

Read data from the stream at a given offset

pub fn write(&self, data: &[u8], append: bool) -> ZxResult<usize>[src]

write data to the stream at the current seek offset or append data at the end of content

pub fn write_at(&self, data: &[u8], offset: usize) -> ZxResult<usize>[src]

Write data to the stream at a given offset

pub fn seek(&self, whence: SeekOrigin, offset: isize) -> ZxResult<usize>[src]

Modify the current seek offset of the stream

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

Get information of the socket.

Trait Implementations

impl Debug for Stream[src]

impl KernelObject for Stream[src]

Auto Trait Implementations

impl !RefUnwindSafe for Stream

impl Send for Stream

impl Sync for Stream

impl Unpin for Stream

impl !UnwindSafe for Stream

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.