Trait AsRawV

Source
pub trait AsRawV: Copy {
    // Required methods
    fn from_raw_result(raw: V) -> Self;
    fn to_raw_arg(self) -> V;

    // Provided method
    fn raw_is_void(self) -> bool { ... }
}
Expand description

Trait implemented by types that can be used as raw system call arguments.

Required Methods§

Source

fn from_raw_result(raw: V) -> Self

Source

fn to_raw_arg(self) -> V

Provided Methods§

Source

fn raw_is_void(self) -> bool

Determines whether this value should represent the absense of a value when used in a context where that makes sense, such as in the final argument of either crate::ioctl or crate::fcntl when the operation does not use the final argument.

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 AsRawV for i8

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for i16

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for i32

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for i64

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for isize

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for u8

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for u16

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for u32

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for u64

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl AsRawV for ()

Source§

impl AsRawV for usize

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl<T> AsRawV for *const T

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Source§

impl<T> AsRawV for *mut T

Source§

fn from_raw_result(raw: V) -> Self

Source§

fn to_raw_arg(self) -> V

Implementors§