pub struct FILE { /* private fields */ }Expand description
This represents the kernel <stdio.h> FILE type.
Implementations§
Source§impl FILE
impl FILE
Sourcepub const unsafe fn new(write: Option<FileCallback>, ptr: *mut c_void) -> Self
pub const unsafe fn new(write: Option<FileCallback>, ptr: *mut c_void) -> Self
Creates a FILE that sends everything written to it to write, passing ptr as the
callback’s first argument, like the C++ FILE(Callback* write, void* ptr) constructor.
§Safety
For the lifetime of the returned FILE, write (if present) must be sound to call with
ptr and any (data, len) where data points to len readable bytes when len > 0 (and
may be null when len == 0).