#[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§
Auto Trait Implementations§
impl Freeze for IWDLSNR
impl RefUnwindSafe for IWDLSNR
impl Send for IWDLSNR
impl Sync for IWDLSNR
impl Unpin for IWDLSNR
impl UnwindSafe for IWDLSNR
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more