Trait Syscall

Source
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§

Source

fn host_read( &self, ctx: &mut dyn SyscallContext, fd: u32, buf: &mut [u8], ) -> Result<u32>

Reads from the host.

Source

fn host_write( &self, ctx: &mut dyn SyscallContext, fd: u32, buf: &[u8], ) -> Result<u32>

Writes to the host.

Implementors§