Trait IntoIobuf

Source
pub unsafe trait IntoIobuf: Sized {
    // Required methods
    fn into_iobuf(self) -> iovec;
    fn as_iobufs(bufs: &[Self]) -> &[iovec];
}
Expand description

Trait for types that can be converted into an iovec that can be referenced by a syscall for the lifetime of this object.

§Safety

This trait is unsafe because interfaces that use this trait depend on the base pointer and size being accurate.

Required Methods§

Source

fn into_iobuf(self) -> iovec

Returns a iovec that describes a contiguous region of memory.

Source

fn as_iobufs(bufs: &[Self]) -> &[iovec]

Returns a slice of iovecs that each describe a contiguous region of memory.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> IntoIobuf for IoSlice<'a>

Source§

fn into_iobuf(self) -> iovec

Source§

fn as_iobufs(bufs: &[Self]) -> &[iovec]

Source§

impl<'a> IntoIobuf for IoSliceMut<'a>

Source§

fn into_iobuf(self) -> iovec

Source§

fn as_iobufs(bufs: &[Self]) -> &[iovec]

Implementors§