Trait FileLike
Source pub trait FileLike: Send + Sync {
// Required methods
fn read(&self, buf: &mut [u8]) -> LinuxResult<usize>;
fn write(&self, buf: &[u8]) -> LinuxResult<usize>;
fn stat(&self) -> LinuxResult<Kstat>;
fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>;
fn poll(&self) -> LinuxResult<PollState>;
fn set_nonblocking(&self, nonblocking: bool) -> LinuxResult;
// Provided methods
fn from_fd(fd: c_int) -> LinuxResult<Arc<Self>>
where Self: Sized + 'static { ... }
fn add_to_fd_table(self) -> LinuxResult<c_int>
where Self: Sized + 'static { ... }
}