#[repr(C)]
pub struct IWDLSNR { pub onopen: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, path: *const c_char, mode: c_int) -> iwrc>, pub onclosing: Option<unsafe extern "C" fn(self_: *mut IWDLSNR) -> iwrc>, pub onset: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, off: off_t, val: u8, len: off_t, flags: c_int) -> iwrc>, pub oncopy: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, off: off_t, len: off_t, noff: off_t, flags: c_int) -> iwrc>, pub onwrite: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, off: off_t, buf: *const c_void, len: off_t, flags: c_int) -> iwrc>, pub onresize: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, osize: off_t, nsize: off_t, flags: c_int, handled: *mut bool) -> iwrc>, pub onsynced: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, flags: c_int) -> iwrc>, }
Expand description

@brief File data events listener.

Fields

onopen: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, path: *const c_char, mode: c_int) -> iwrc>

@brief Before file open event.

@param path File path @param mode File open mode same as in open(2)

onclosing: Option<unsafe extern "C" fn(self_: *mut IWDLSNR) -> iwrc>

@brief Before file been closed.

onset: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, off: off_t, val: u8, len: off_t, flags: c_int) -> iwrc>

@brief Write @a val value starting at @a off @a len bytes

oncopy: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, off: off_t, len: off_t, noff: off_t, flags: c_int) -> iwrc>

@brief Copy @a len bytes from @a off offset to @a noff offset

onwrite: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, off: off_t, buf: *const c_void, len: off_t, flags: c_int) -> iwrc>

@brief Write @buf of @a len bytes at @a off

onresize: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, osize: off_t, nsize: off_t, flags: c_int, handled: *mut bool) -> iwrc>

@brief File need to be resized.

@param osize Old file size @param nsize New file size @param [out] handled File resizing handled by llistener.

onsynced: Option<unsafe extern "C" fn(self_: *mut IWDLSNR, flags: c_int) -> iwrc>

@brief File sync successful

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.