pub trait Syscall {
// Required methods
fn host_read(
&self,
ctx: &mut dyn SyscallContext,
fd: u32,
buf: &mut [u8],
) -> Result<u32>;
fn host_write(
&self,
ctx: &mut dyn SyscallContext,
fd: u32,
buf: &[u8],
) -> Result<u32>;
}Expand description
A host-side implementation of a system call.
Required Methods§
Sourcefn host_read(
&self,
ctx: &mut dyn SyscallContext,
fd: u32,
buf: &mut [u8],
) -> Result<u32>
fn host_read( &self, ctx: &mut dyn SyscallContext, fd: u32, buf: &mut [u8], ) -> Result<u32>
Reads from the host.
Sourcefn host_write(
&self,
ctx: &mut dyn SyscallContext,
fd: u32,
buf: &[u8],
) -> Result<u32>
fn host_write( &self, ctx: &mut dyn SyscallContext, fd: u32, buf: &[u8], ) -> Result<u32>
Writes to the host.