Trait forest_filecoin::shim::fvm_latest::syscalls::Syscall

source ·
pub trait Syscall<K, Args, Ret>: Send + Sync + 'static {
    // Required method
    fn link(
        self,
        linker: &mut Linker<K>,
        module: &'static str,
        name: &'static str,
    ) -> Result<(), Error>;
}
Expand description

A Syscall is a function in the form fn(Context<'_, K>, I...) -> R where:

  • K is the kernel type. Constrain this to the precise kernel operations you need, or even a specific kernel implementation.
  • I..., the syscall parameters, are 0-8 types, each one of u32, u64, i32, or i64.
  • R is a type implementing IntoControlFlow. This is usually one of:

You generally shouldn’t implement this trait yourself.

Required Methods§

Link this syscall with the specified linker, module name, and function name.

Implementors§

source§

impl<A, B, C, D, E, F, G, H, Ret, K, Func> Syscall<K, (A, B, C, D, E, F, G, H), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B, C, D, E, F, G, H) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe, C: WasmTy + SyscallSafe, D: WasmTy + SyscallSafe, E: WasmTy + SyscallSafe, F: WasmTy + SyscallSafe, G: WasmTy + SyscallSafe, H: WasmTy + SyscallSafe,

source§

impl<A, B, C, D, E, F, G, Ret, K, Func> Syscall<K, (A, B, C, D, E, F, G), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B, C, D, E, F, G) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe, C: WasmTy + SyscallSafe, D: WasmTy + SyscallSafe, E: WasmTy + SyscallSafe, F: WasmTy + SyscallSafe, G: WasmTy + SyscallSafe,

source§

impl<A, B, C, D, E, F, Ret, K, Func> Syscall<K, (A, B, C, D, E, F), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B, C, D, E, F) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe, C: WasmTy + SyscallSafe, D: WasmTy + SyscallSafe, E: WasmTy + SyscallSafe, F: WasmTy + SyscallSafe,

source§

impl<A, B, C, D, E, Ret, K, Func> Syscall<K, (A, B, C, D, E), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B, C, D, E) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe, C: WasmTy + SyscallSafe, D: WasmTy + SyscallSafe, E: WasmTy + SyscallSafe,

source§

impl<A, B, C, D, Ret, K, Func> Syscall<K, (A, B, C, D), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B, C, D) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe, C: WasmTy + SyscallSafe, D: WasmTy + SyscallSafe,

source§

impl<A, B, C, Ret, K, Func> Syscall<K, (A, B, C), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B, C) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe, C: WasmTy + SyscallSafe,

source§

impl<A, B, Ret, K, Func> Syscall<K, (A, B), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A, B) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe, B: WasmTy + SyscallSafe,

source§

impl<A, Ret, K, Func> Syscall<K, (A,), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>, A) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow, A: WasmTy + SyscallSafe,

source§

impl<Ret, K, Func> Syscall<K, (), Ret> for Func
where K: Kernel, Func: Fn(Context<'_, K>) -> Ret + Send + Sync + 'static, Ret: IntoControlFlow,