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 Freeze 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.