libc_extra/android_linux/stdio/
cookie_io_functions_t.rs1#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8#[repr(C)]
9pub struct cookie_io_functions_t
10{
11 pub read: cookie_read_function_t,
13
14 pub write: cookie_write_function_t,
16
17 pub seek: cookie_seek_function_t,
19
20 pub close: cookie_close_function_t,
22}
23
24impl Default for cookie_io_functions_t
25{
26 #[inline(always)]
27 fn default() -> Self
28 {
29 Self
30 {
31 read: Self::default_read,
32 write: Self::default_write,
33 seek: Self::default_seek,
34 close: Self::default_close,
35 }
36 }
37}
38
39impl cookie_io_functions_t
40{
41 pub unsafe extern "C" fn default_read(_cookier: *mut c_void, _buf: *mut c_char, _size: size_t) -> ssize_t
43 {
44 0
45 }
46
47 pub unsafe extern "C" fn default_write(_cookier: *mut c_void, _buf: *const c_char, _size: size_t) -> ssize_t
49 {
50 0
51 }
52
53 pub unsafe extern "C" fn default_seek(_cookier: *mut c_void, _offset: *mut off_t, _whence: c_int) -> c_int
55 {
56 0
57 }
58
59 pub unsafe extern "C" fn default_close(_cookier: *mut c_void) -> c_int
61 {
62 0
63 }
64}