pub trait HostFunction0<'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 zero 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.