#[repr(C)]pub struct cookie_io_functions_t {
pub read: cookie_read_function_t,
pub write: cookie_write_function_t,
pub seek: cookie_seek_function_t,
pub close: cookie_close_function_t,
}
Expand description
Used by fopencookie
.
Fields§
§read: cookie_read_function_t
Read function pointer.
write: cookie_write_function_t
Write function pointer.
seek: cookie_seek_function_t
Seek function pointer.
close: cookie_close_function_t
Close function pointer.
Implementations§
Sourcepub unsafe extern "C" fn default_read(
_cookier: *mut c_void,
_buf: *mut c_char,
_size: size_t,
) -> ssize_t
pub unsafe extern "C" fn default_read( _cookier: *mut c_void, _buf: *mut c_char, _size: size_t, ) -> ssize_t
No-op cookie read function.
Sourcepub unsafe extern "C" fn default_write(
_cookier: *mut c_void,
_buf: *const c_char,
_size: size_t,
) -> ssize_t
pub unsafe extern "C" fn default_write( _cookier: *mut c_void, _buf: *const c_char, _size: size_t, ) -> ssize_t
No-op cookie write function.
Sourcepub unsafe extern "C" fn default_seek(
_cookier: *mut c_void,
_offset: *mut off_t,
_whence: c_int,
) -> c_int
pub unsafe extern "C" fn default_seek( _cookier: *mut c_void, _offset: *mut off_t, _whence: c_int, ) -> c_int
No-op cookie seek function.
Sourcepub unsafe extern "C" fn default_close(_cookier: *mut c_void) -> c_int
pub unsafe extern "C" fn default_close(_cookier: *mut c_void) -> c_int
No-op cookie close function.
Trait Implementations§
Source§fn clone(&self) -> cookie_io_functions_t
fn clone(&self) -> cookie_io_functions_t
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§fn cmp(&self, other: &cookie_io_functions_t) -> Ordering
fn cmp(&self, other: &cookie_io_functions_t) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
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