shadow_rs::host::syscall::handler

Trait SyscallHandlerFn

source
pub trait SyscallHandlerFn<T> {
    // Required method
    fn call(self, ctx: &mut SyscallContext<'_, '_>) -> SyscallResult;
}

Required Methods§

source

fn call(self, ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

Implementors§

source§

impl<F, E, T0> SyscallHandlerFn<()> for F
where F: Fn(&mut SyscallContext<'_, '_>) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>,

source§

impl<F, E, T0, T1> SyscallHandlerFn<(T1,)> for F
where F: Fn(&mut SyscallContext<'_, '_>, T1) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>, T1: From<SyscallReg>,

source§

impl<F, E, T0, T1, T2> SyscallHandlerFn<(T1, T2)> for F
where F: Fn(&mut SyscallContext<'_, '_>, T1, T2) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>, T1: From<SyscallReg>, T2: From<SyscallReg>,

source§

impl<F, E, T0, T1, T2, T3> SyscallHandlerFn<(T1, T2, T3)> for F
where F: Fn(&mut SyscallContext<'_, '_>, T1, T2, T3) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>, T1: From<SyscallReg>, T2: From<SyscallReg>, T3: From<SyscallReg>,

source§

impl<F, E, T0, T1, T2, T3, T4> SyscallHandlerFn<(T1, T2, T3, T4)> for F
where F: Fn(&mut SyscallContext<'_, '_>, T1, T2, T3, T4) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>, T1: From<SyscallReg>, T2: From<SyscallReg>, T3: From<SyscallReg>, T4: From<SyscallReg>,

source§

impl<F, E, T0, T1, T2, T3, T4, T5> SyscallHandlerFn<(T1, T2, T3, T4, T5)> for F
where F: Fn(&mut SyscallContext<'_, '_>, T1, T2, T3, T4, T5) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>, T1: From<SyscallReg>, T2: From<SyscallReg>, T3: From<SyscallReg>, T4: From<SyscallReg>, T5: From<SyscallReg>,

source§

impl<F, E, T0, T1, T2, T3, T4, T5, T6> SyscallHandlerFn<(T1, T2, T3, T4, T5, T6)> for F
where F: Fn(&mut SyscallContext<'_, '_>, T1, T2, T3, T4, T5, T6) -> Result<T0, E>, E: Into<SyscallError>, T0: Into<SyscallReg>, T1: From<SyscallReg>, T2: From<SyscallReg>, T3: From<SyscallReg>, T4: From<SyscallReg>, T5: From<SyscallReg>, T6: From<SyscallReg>,