Struct syncio::Zxio

source ·
pub struct Zxio { /* private fields */ }
Expand description

A handle to a zxio object.

Note: the underlying storage backing the object is pinned on the heap because it can contain self referential data.

Implementations§

source§

impl Zxio

source

pub fn new_socket<S: ServiceConnector>( domain: c_int, socket_type: c_int, protocol: c_int ) -> Result<Result<Self, ZxioErrorCode>, Status>

source

pub fn create(handle: Handle) -> Result<Zxio, Status>

source

pub fn release(self) -> Result<Handle, Status>

source

pub fn open(&self, flags: OpenFlags, path: &str) -> Result<Self, Status>

source

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

source

pub fn clone(&self) -> Result<Zxio, Status>

source

pub fn read_at(&self, offset: u64, data: &mut [u8]) -> Result<usize, Status>

source

pub fn write(&self, data: &[u8]) -> Result<usize, Status>

source

pub fn write_at(&self, offset: u64, data: &[u8]) -> Result<usize, Status>

source

pub fn truncate(&self, length: u64) -> Result<(), Status>

source

pub fn seek( &self, seek_origin: SeekOrigin, offset: i64 ) -> Result<usize, Status>

source

pub fn vmo_get(&self, flags: VmarFlags) -> Result<Vmo, Status>

source

pub fn attr_get(&self) -> Result<zxio_node_attributes_t, Status>

source

pub fn attr_set( &self, attributes: &zxio_node_attributes_t ) -> Result<(), Status>

source

pub fn rename( &self, old_path: &str, new_directory: &Zxio, new_path: &str ) -> Result<(), Status>

source

pub fn wait_begin( &self, zxio_signals: zxio_signals_t ) -> (Unowned<'_, Handle>, Signals)

source

pub fn wait_end(&self, signals: Signals) -> zxio_signals_t

source

pub fn create_dirent_iterator(&self) -> Result<DirentIterator, Status>

source

pub fn connect(&self, addr: &[u8]) -> Result<Result<(), ZxioErrorCode>, Status>

source

pub fn bind(&self, addr: &[u8]) -> Result<Result<(), ZxioErrorCode>, Status>

source

pub fn listen(&self, backlog: i32) -> Result<Result<(), ZxioErrorCode>, Status>

source

pub fn accept(&self) -> Result<Result<Zxio, ZxioErrorCode>, Status>

source

pub fn getsockname(&self) -> Result<Result<Vec<u8>, ZxioErrorCode>, Status>

source

pub fn getpeername(&self) -> Result<Result<Vec<u8>, ZxioErrorCode>, Status>

source

pub fn getsockopt( &self, level: u32, optname: u32, optlen: socklen_t ) -> Result<Result<Vec<u8>, ZxioErrorCode>, Status>

source

pub fn setsockopt( &self, level: i32, optname: i32, optval: &[u8] ) -> Result<Result<(), ZxioErrorCode>, Status>

source

pub fn shutdown( &self, flags: ZxioShutdownFlags ) -> Result<Result<(), ZxioErrorCode>, Status>

source

pub fn sendmsg( &self, addr: Vec<u8>, buffer: Vec<u8>, cmsg: Vec<u8>, flags: u32 ) -> Result<Result<usize, ZxioErrorCode>, Status>

source

pub fn recvmsg( &self, iovec_length: usize, flags: u32 ) -> Result<Result<RecvMessageInfo, ZxioErrorCode>, Status>

Trait Implementations§

source§

impl Debug for Zxio

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Zxio

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for Zxio

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Zxio

§

impl Send for Zxio

§

impl Sync for Zxio

§

impl Unpin for Zxio

§

impl UnwindSafe for Zxio

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more