pub trait HostFunction10<'a, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>where
P1: SupportedParameterType<P1> + Clone + 'a,
P2: SupportedParameterType<P2> + Clone + 'a,
P3: SupportedParameterType<P3> + Clone + 'a,
P4: SupportedParameterType<P4> + Clone + 'a,
P5: SupportedParameterType<P5> + Clone + 'a,
P6: SupportedParameterType<P6> + Clone + 'a,
P7: SupportedParameterType<P7> + Clone + 'a,
P8: SupportedParameterType<P8> + Clone + 'a,
P9: SupportedParameterType<P9> + Clone + 'a,
P10: SupportedParameterType<P10> + Clone + 'a,
R: SupportedReturnType<R>,{
// Required methods
fn register(
&self,
sandbox: &mut UninitializedSandbox,
name: &str,
) -> Result<()>;
fn register_with_extra_allowed_syscalls(
&self,
sandbox: &mut UninitializedSandbox,
name: &str,
extra_allowed_syscalls: Vec<ExtraAllowedSyscall>,
) -> Result<()>;
}
Expand description
Trait for registering a host function with $N parameters.
Required Methods§
Sourcefn register(&self, sandbox: &mut UninitializedSandbox, name: &str) -> Result<()>
fn register(&self, sandbox: &mut UninitializedSandbox, name: &str) -> Result<()>
Register the host function with the given name in the sandbox.
Sourcefn register_with_extra_allowed_syscalls(
&self,
sandbox: &mut UninitializedSandbox,
name: &str,
extra_allowed_syscalls: Vec<ExtraAllowedSyscall>,
) -> Result<()>
fn register_with_extra_allowed_syscalls( &self, sandbox: &mut UninitializedSandbox, name: &str, extra_allowed_syscalls: Vec<ExtraAllowedSyscall>, ) -> Result<()>
Register the host function with the given name in the sandbox, allowing extra syscalls.