SystemImpl

Struct SystemImpl 

Source
pub struct SystemImpl {
Show 21 fields pub inner: Pin<Box<dyn Any>>, pub read: fn(this: &SystemImpl, fd: RawFd, buf: &mut [u8]) -> Result<isize>, pub write: fn(this: &SystemImpl, fd: RawFd, buf: &[u8]) -> Result<isize>, pub ioctl: unsafe extern "C" fn(fd: RawFd, request: u64, ...) -> i32, pub close: fn(this: &SystemImpl, fd: RawFd) -> Result<i32>, pub clock_gettime: fn(this: &SystemImpl, clockid: clockid_t, value: &mut timespec) -> Result<i32>, pub clock_getres: fn(this: &SystemImpl, clockid: clockid_t, res: &mut timespec) -> Result<i32>, pub pollfd_create: fn(this: &SystemImpl, flags: Fd) -> Result<i32>, pub pollfd_add: fn(this: &SystemImpl, pfd: RawFd, fd: RawFd, events: Io, data: u64) -> Result<i32>, pub pollfd_mod: fn(this: &SystemImpl, pfd: RawFd, fd: RawFd, events: Io, data: u64) -> Result<i32>, pub pollfd_del: fn(this: &SystemImpl, pfd: RawFd, fd: RawFd) -> Result<i32>, pub pollfd_wait: fn(this: &SystemImpl, pfd: RawFd, events: &mut [PollEvent], timeout: i32) -> Result<i32>, pub timerfd_create: fn(this: &SystemImpl, clockid: i32, flags: Fd) -> Result<i32>, pub timerfd_settime: fn(this: &SystemImpl, fd: RawFd, flags: Fd, new_value: &itimerspec, old_value: Option<&mut itimerspec>) -> Result<i32>, pub timerfd_gettime: fn(this: &SystemImpl, fd: RawFd, curr_value: &mut itimerspec) -> Result<i32>, pub timerfd_read: fn(this: &SystemImpl, fd: RawFd) -> Result<u64>, pub eventfd_create: fn(this: &SystemImpl, flags: Fd) -> Result<i32>, pub eventfd_write: fn(this: &SystemImpl, fd: RawFd, count: u64) -> Result<i32>, pub eventfd_read: fn(this: &SystemImpl, fd: RawFd) -> Result<u64>, pub signalfd_create: fn(this: &SystemImpl, signal: u32, flags: Fd) -> Result<i32>, pub signalfd_read: fn(this: &SystemImpl, fd: RawFd) -> Result<u32>,
}

Fields§

§inner: Pin<Box<dyn Any>>§read: fn(this: &SystemImpl, fd: RawFd, buf: &mut [u8]) -> Result<isize>§write: fn(this: &SystemImpl, fd: RawFd, buf: &[u8]) -> Result<isize>§ioctl: unsafe extern "C" fn(fd: RawFd, request: u64, ...) -> i32§close: fn(this: &SystemImpl, fd: RawFd) -> Result<i32>§clock_gettime: fn(this: &SystemImpl, clockid: clockid_t, value: &mut timespec) -> Result<i32>§clock_getres: fn(this: &SystemImpl, clockid: clockid_t, res: &mut timespec) -> Result<i32>§pollfd_create: fn(this: &SystemImpl, flags: Fd) -> Result<i32>§pollfd_add: fn(this: &SystemImpl, pfd: RawFd, fd: RawFd, events: Io, data: u64) -> Result<i32>§pollfd_mod: fn(this: &SystemImpl, pfd: RawFd, fd: RawFd, events: Io, data: u64) -> Result<i32>§pollfd_del: fn(this: &SystemImpl, pfd: RawFd, fd: RawFd) -> Result<i32>§pollfd_wait: fn(this: &SystemImpl, pfd: RawFd, events: &mut [PollEvent], timeout: i32) -> Result<i32>§timerfd_create: fn(this: &SystemImpl, clockid: i32, flags: Fd) -> Result<i32>§timerfd_settime: fn(this: &SystemImpl, fd: RawFd, flags: Fd, new_value: &itimerspec, old_value: Option<&mut itimerspec>) -> Result<i32>§timerfd_gettime: fn(this: &SystemImpl, fd: RawFd, curr_value: &mut itimerspec) -> Result<i32>§timerfd_read: fn(this: &SystemImpl, fd: RawFd) -> Result<u64>§eventfd_create: fn(this: &SystemImpl, flags: Fd) -> Result<i32>§eventfd_write: fn(this: &SystemImpl, fd: RawFd, count: u64) -> Result<i32>§eventfd_read: fn(this: &SystemImpl, fd: RawFd) -> Result<u64>§signalfd_create: fn(this: &SystemImpl, signal: u32, flags: Fd) -> Result<i32>§signalfd_read: fn(this: &SystemImpl, fd: RawFd) -> Result<u32>

Implementations§

Source§

impl SystemImpl

Source

pub fn read(&self, fd: RawFd, buf: &mut [u8]) -> Result<isize>

Source

pub fn write(&self, fd: RawFd, buf: &[u8]) -> Result<isize>

Source

pub fn close(&self, fd: RawFd) -> Result<i32>

Source

pub fn clock_gettime( &self, clockid: clockid_t, value: &mut timespec, ) -> Result<i32>

Source

pub fn clock_getres( &self, clockid: clockid_t, res: &mut timespec, ) -> Result<i32>

Source

pub fn pollfd_create(&self, flags: Fd) -> Result<i32>

Source

pub fn pollfd_add( &self, pfd: RawFd, fd: RawFd, events: Io, data: u64, ) -> Result<i32>

Source

pub fn pollfd_mod( &self, pfd: RawFd, fd: RawFd, events: Io, data: u64, ) -> Result<i32>

Source

pub fn pollfd_del(&self, pfd: RawFd, fd: RawFd) -> Result<i32>

Source

pub fn pollfd_wait( &self, pfd: RawFd, events: &mut [PollEvent], timeout: i32, ) -> Result<i32>

Source

pub fn timerfd_create(&self, clockid: i32, flags: Fd) -> Result<i32>

Source

pub fn timerfd_settime( &self, fd: RawFd, flags: Fd, new_value: &itimerspec, old_value: Option<&mut itimerspec>, ) -> Result<i32>

Source

pub fn timerfd_gettime( &self, fd: RawFd, curr_value: &mut itimerspec, ) -> Result<i32>

Source

pub fn timerfd_read(&self, fd: RawFd) -> Result<u64>

Source

pub fn eventfd_create(&self, flags: Fd) -> Result<i32>

Source

pub fn eventfd_write(&self, fd: RawFd, count: u64) -> Result<i32>

Source

pub fn eventfd_read(&self, fd: RawFd) -> Result<u64>

Source

pub fn signalfd_create(&self, signal: u32, flags: Fd) -> Result<i32>

Source

pub fn signalfd_read(&self, fd: RawFd) -> Result<u32>

Trait Implementations§

Source§

impl Interface for SystemImpl

Source§

unsafe fn make_native(&self) -> *mut CInterface

Return a C-compatible spa_interface pointer Read more
Source§

unsafe fn free_native(system: *mut CInterface)

Return a C-compatible spa_interface pointer Read more
Source§

fn type_id(&self) -> TypeId
where Self: 'static,

Source§

impl Send for SystemImpl

Source§

impl Sync for SystemImpl

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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.

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.