kos_sys::os::fs

Struct vfs_handler_t

Source
#[repr(C)]
pub struct vfs_handler_t {
Show 29 fields pub nmmgr: nmmgr_handler_t, pub cache: c_int, pub privdata: *mut c_void, pub open: Option<unsafe extern "C" fn(vfs: vfs_handler_t, fn: *const c_char, mode: c_int) -> *mut c_void>, pub close: Option<unsafe extern "C" fn(hnd: *mut c_void) -> c_int>, pub read: Option<unsafe extern "C" fn(hnd: *mut c_void, buffer: *mut c_void, cnt: c_size_t) -> c_ssize_t>, pub write: Option<unsafe extern "C" fn(hnd: *mut c_void, buffer: *const c_void, cnt: c_size_t) -> c_ssize_t>, pub seek: Option<unsafe extern "C" fn(hnd: *mut c_void, offset: off_t, whence: c_int) -> off_t>, pub tell: Option<unsafe extern "C" fn(hnd: *mut c_void) -> off_t>, pub total: Option<unsafe extern "C" fn(hnd: *mut c_void) -> c_size_t>, pub readdir: Option<unsafe extern "C" fn(hnd: *mut c_void) -> *mut dirent_t>, pub ioctl: Option<unsafe extern "C" fn(hnd: *mut c_void, cmd: c_int, ap: VaList<'_, '_>) -> c_int>, pub rename: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn1: *const c_char, fn2: *const c_char) -> c_int>, pub unlink: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn: *const c_char) -> c_int>, pub mmap: Option<unsafe extern "C" fn(fd: *mut c_void) -> *mut c_void>, pub complete: Option<unsafe extern "C" fn(fd: *mut c_void, rv: *mut c_ssize_t) -> c_int>, pub stat: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path: *const c_char, buf: *mut stat, flag: c_int) -> c_int>, pub mkdir: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn: *const c_char) -> c_int>, pub rmdir: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn: *const c_char) -> c_int>, pub fcntl: Option<unsafe extern "C" fn(fd: *mut c_void, cmd: c_int, ap: VaList<'_, '_>) -> c_int>, pub poll: Option<unsafe extern "C" fn(fd: *mut c_void, events: c_short) -> c_short>, pub link: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path1: *const c_char, path2: *const c_char) -> c_int>, pub symlink: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path1: *const c_char, path2: *const c_char) -> c_int>, pub seek64: Option<unsafe extern "C" fn(hnd: *mut c_void, offset: off64_t, whence: c_int) -> off64_t>, pub tell64: Option<unsafe extern "C" fn(hnd: *mut c_void) -> off64_t>, pub total64: Option<unsafe extern "C" fn(hnd: *mut c_void) -> u64>, pub readlink: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path: *const c_char, buf: *mut c_char, bufsize: c_size_t) -> c_ssize_t>, pub rewinddir: Option<unsafe extern "C" fn(hnd: *mut c_void) -> c_int>, pub fstat: Option<unsafe extern "C" fn(hnd: *mut c_void, st: *mut stat) -> c_int>,
}

Fields§

§nmmgr: nmmgr_handler_t§cache: c_int§privdata: *mut c_void§open: Option<unsafe extern "C" fn(vfs: vfs_handler_t, fn: *const c_char, mode: c_int) -> *mut c_void>§close: Option<unsafe extern "C" fn(hnd: *mut c_void) -> c_int>§read: Option<unsafe extern "C" fn(hnd: *mut c_void, buffer: *mut c_void, cnt: c_size_t) -> c_ssize_t>§write: Option<unsafe extern "C" fn(hnd: *mut c_void, buffer: *const c_void, cnt: c_size_t) -> c_ssize_t>§seek: Option<unsafe extern "C" fn(hnd: *mut c_void, offset: off_t, whence: c_int) -> off_t>§tell: Option<unsafe extern "C" fn(hnd: *mut c_void) -> off_t>§total: Option<unsafe extern "C" fn(hnd: *mut c_void) -> c_size_t>§readdir: Option<unsafe extern "C" fn(hnd: *mut c_void) -> *mut dirent_t>§ioctl: Option<unsafe extern "C" fn(hnd: *mut c_void, cmd: c_int, ap: VaList<'_, '_>) -> c_int>§rename: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn1: *const c_char, fn2: *const c_char) -> c_int>§unlink: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn: *const c_char) -> c_int>§mmap: Option<unsafe extern "C" fn(fd: *mut c_void) -> *mut c_void>§complete: Option<unsafe extern "C" fn(fd: *mut c_void, rv: *mut c_ssize_t) -> c_int>§stat: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path: *const c_char, buf: *mut stat, flag: c_int) -> c_int>§mkdir: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn: *const c_char) -> c_int>§rmdir: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, fn: *const c_char) -> c_int>§fcntl: Option<unsafe extern "C" fn(fd: *mut c_void, cmd: c_int, ap: VaList<'_, '_>) -> c_int>§poll: Option<unsafe extern "C" fn(fd: *mut c_void, events: c_short) -> c_short>§link: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path1: *const c_char, path2: *const c_char) -> c_int>§symlink: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path1: *const c_char, path2: *const c_char) -> c_int>§seek64: Option<unsafe extern "C" fn(hnd: *mut c_void, offset: off64_t, whence: c_int) -> off64_t>§tell64: Option<unsafe extern "C" fn(hnd: *mut c_void) -> off64_t>§total64: Option<unsafe extern "C" fn(hnd: *mut c_void) -> u64>§readlink: Option<unsafe extern "C" fn(vfs: *mut vfs_handler_t, path: *const c_char, buf: *mut c_char, bufsize: c_size_t) -> c_ssize_t>§rewinddir: Option<unsafe extern "C" fn(hnd: *mut c_void) -> c_int>§fstat: Option<unsafe extern "C" fn(hnd: *mut c_void, st: *mut stat) -> c_int>

Auto Trait Implementations§

§

impl Freeze for vfs_handler_t

§

impl RefUnwindSafe for vfs_handler_t

§

impl !Send for vfs_handler_t

§

impl !Sync for vfs_handler_t

§

impl Unpin for vfs_handler_t

§

impl UnwindSafe for vfs_handler_t

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.