#[repr(C)]pub struct osdp_file_ops {
pub arg: *mut c_void,
pub open: osdp_file_open_fn_t,
pub read: osdp_file_read_fn_t,
pub write: osdp_file_write_fn_t,
pub close: osdp_file_close_fn_t,
}Expand description
@brief OSDP File operations struct that needs to be filled by the CP/PD application and registered with LibOSDP using osdp_file_register_ops() before a file transfer command can be initiated.
Fields§
§arg: *mut c_void@brief A opaque pointer to private data that can be filled by the application which will be passed as the first argument for each of the below functions. Applications can keep their file context info such as the open file descriptors or any other private data here.
open: osdp_file_open_fn_t< open handler function
read: osdp_file_read_fn_t< read handler function
write: osdp_file_write_fn_t< write handler function
close: osdp_file_close_fn_t< close handler function
Trait Implementations§
Source§impl Clone for osdp_file_ops
impl Clone for osdp_file_ops
impl Copy for osdp_file_ops
Auto Trait Implementations§
impl !Send for osdp_file_ops
impl !Sync for osdp_file_ops
impl Freeze for osdp_file_ops
impl RefUnwindSafe for osdp_file_ops
impl Unpin for osdp_file_ops
impl UnsafeUnpin for osdp_file_ops
impl UnwindSafe for osdp_file_ops
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