1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[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,
}
impl Default for cookie_io_functions_t
{
#[inline(always)]
fn default() -> Self
{
Self
{
read: Self::default_read,
write: Self::default_write,
seek: Self::default_seek,
close: Self::default_close,
}
}
}
impl cookie_io_functions_t
{
pub unsafe extern "C" fn default_read(_cookier: *mut c_void, _buf: *mut c_char, _size: size_t) -> ssize_t
{
0
}
pub unsafe extern "C" fn default_write(_cookier: *mut c_void, _buf: *const c_char, _size: size_t) -> ssize_t
{
0
}
pub unsafe extern "C" fn default_seek(_cookier: *mut c_void, _offset: *mut off_t, _whence: c_int) -> c_int
{
0
}
pub unsafe extern "C" fn default_close(_cookier: *mut c_void) -> c_int
{
0
}
}