pub struct HostFunction {
pub input_schema: Value,
pub timeout_ms: Option<u64>,
pub execute: HostFunctionCallback,
}Expand description
A single host function. The key it is registered under names it, and the
input schema’s description documents it for the agent.
Fields§
§input_schema: ValueJSON Schema for the host function input (forwarded to the sidecar register_host_callbacks definition).
timeout_ms: Option<u64>§execute: HostFunctionCallbackHost-side implementation, invoked when the guest calls <collection>:<function>.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HostFunction
impl !UnwindSafe for HostFunction
impl Forget for HostFunction
impl Freeze for HostFunction
impl Move for HostFunction
impl Send for HostFunction
impl Sync for HostFunction
impl Unpin for HostFunction
impl UnsafeUnpin for HostFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more