Struct OsFileIoApi

Source
#[repr(C)]
pub struct OsFileIoApi { pub open_input: Option<unsafe extern "C" fn(path: *const c_char) -> FileO>, pub open_output: Option<unsafe extern "C" fn(path: *const c_char) -> FileO>, pub open_append: Option<unsafe extern "C" fn(path: *const c_char) -> FileO>, pub set_position: Option<unsafe extern "C" fn(file: FileO, pos: u64)>, pub size: Option<unsafe extern "C" fn(file: FileO) -> u64>, pub read: Option<unsafe extern "C" fn(file: FileO, buffer: *mut c_void, size: u64) -> i64>, pub write: Option<unsafe extern "C" fn(file: FileO, buffer: *const c_void, size: u64) -> bool>, pub read_at: Option<unsafe extern "C" fn(file: FileO, offset: u64, buffer: *mut c_void, size: u64) -> i64>, pub write_at: Option<unsafe extern "C" fn(file: FileO, offset: u64, buffer: *const c_void, size: u64) -> bool>, pub set_last_modified_time: Option<unsafe extern "C" fn(file: FileO, time: FileTimeO)>, pub close: Option<unsafe extern "C" fn(file: FileO)>, }

Fields§

§open_input: Option<unsafe extern "C" fn(path: *const c_char) -> FileO>§open_output: Option<unsafe extern "C" fn(path: *const c_char) -> FileO>§open_append: Option<unsafe extern "C" fn(path: *const c_char) -> FileO>§set_position: Option<unsafe extern "C" fn(file: FileO, pos: u64)>§size: Option<unsafe extern "C" fn(file: FileO) -> u64>§read: Option<unsafe extern "C" fn(file: FileO, buffer: *mut c_void, size: u64) -> i64>§write: Option<unsafe extern "C" fn(file: FileO, buffer: *const c_void, size: u64) -> bool>§read_at: Option<unsafe extern "C" fn(file: FileO, offset: u64, buffer: *mut c_void, size: u64) -> i64>§write_at: Option<unsafe extern "C" fn(file: FileO, offset: u64, buffer: *const c_void, size: u64) -> bool>§set_last_modified_time: Option<unsafe extern "C" fn(file: FileO, time: FileTimeO)>§close: Option<unsafe extern "C" fn(file: FileO)>

Implementations§

Source§

impl OsFileIoApi

Source

pub unsafe fn open_input(&self, path: *const c_char) -> FileO

Source

pub unsafe fn open_output(&self, path: *const c_char) -> FileO

Source

pub unsafe fn open_append(&self, path: *const c_char) -> FileO

Source

pub unsafe fn set_position(&self, file: FileO, pos: u64)

Source

pub unsafe fn size(&self, file: FileO) -> u64

Source

pub unsafe fn read(&self, file: FileO, buffer: *mut c_void, size: u64) -> i64

Source

pub unsafe fn write( &self, file: FileO, buffer: *const c_void, size: u64, ) -> bool

Source

pub unsafe fn read_at( &self, file: FileO, offset: u64, buffer: *mut c_void, size: u64, ) -> i64

Source

pub unsafe fn write_at( &self, file: FileO, offset: u64, buffer: *const c_void, size: u64, ) -> bool

Source

pub unsafe fn set_last_modified_time(&self, file: FileO, time: FileTimeO)

Source

pub unsafe fn close(&self, file: FileO)

Trait Implementations§

Source§

impl Api for OsFileIoApi

Source§

impl Clone for OsFileIoApi

Source§

fn clone(&self) -> OsFileIoApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for OsFileIoApi

Source§

fn default() -> OsFileIoApi

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

impl Copy for OsFileIoApi

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.