pub trait FileSystem {
// Provided methods
fn host_open(
&self,
_filename: Vec<u8>,
_flags: HostOpenFlags,
_mode: HostMode,
) -> IOResult<u64> { ... }
fn host_close(&self, _fd: u64) -> IOResult<()> { ... }
fn host_pread(
&self,
_fd: u64,
_count: u64,
_offset: u64,
) -> IOResult<Vec<u8>> { ... }
fn host_pwrite(
&self,
_fd: u64,
_offset: u64,
_data: Vec<u8>,
) -> IOResult<u64> { ... }
fn host_fstat(&self, _fd: u64) -> IOResult<HostStat> { ... }
fn host_unlink(&self, _filename: Vec<u8>) -> IOResult<()> { ... }
fn host_readlink(&self, _filename: Vec<u8>) -> IOResult<Vec<u8>> { ... }
fn host_setfs(&self, _pid: u64) -> IOResult<()> { ... }
}Expand description
TODO: doc
Provided Methods§
Sourcefn host_open(
&self,
_filename: Vec<u8>,
_flags: HostOpenFlags,
_mode: HostMode,
) -> IOResult<u64>
fn host_open( &self, _filename: Vec<u8>, _flags: HostOpenFlags, _mode: HostMode, ) -> IOResult<u64>
Open a file on the remote stub’s current filesystem.
Sourcefn host_close(&self, _fd: u64) -> IOResult<()>
fn host_close(&self, _fd: u64) -> IOResult<()>
Close a file opened with host_open.
Sourcefn host_pread(&self, _fd: u64, _count: u64, _offset: u64) -> IOResult<Vec<u8>>
fn host_pread(&self, _fd: u64, _count: u64, _offset: u64) -> IOResult<Vec<u8>>
Read data from an open file at the given offset.
Sourcefn host_pwrite(&self, _fd: u64, _offset: u64, _data: Vec<u8>) -> IOResult<u64>
fn host_pwrite(&self, _fd: u64, _offset: u64, _data: Vec<u8>) -> IOResult<u64>
Write data to an open file at the given offset.
Sourcefn host_fstat(&self, _fd: u64) -> IOResult<HostStat>
fn host_fstat(&self, _fd: u64) -> IOResult<HostStat>
Return a HostStat describing the attributes of the given open file.
Sourcefn host_unlink(&self, _filename: Vec<u8>) -> IOResult<()>
fn host_unlink(&self, _filename: Vec<u8>) -> IOResult<()>
Remove a file from the remote stub’s current filesystem.
Sourcefn host_readlink(&self, _filename: Vec<u8>) -> IOResult<Vec<u8>>
fn host_readlink(&self, _filename: Vec<u8>) -> IOResult<Vec<u8>>
Read the contents of a symbolic link on the remote stub’s current filesystem.
Sourcefn host_setfs(&self, _pid: u64) -> IOResult<()>
fn host_setfs(&self, _pid: u64) -> IOResult<()>
Set the current filesystem for subsequent host I/O requests. If the given pid is 0, select the filesystem of the remote stub. Otherwise, select the filesystem as seen by the process with the given pid.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".