pub struct HostcallRequest {
pub call_id: String,
pub kind: HostcallKind,
pub payload: Value,
pub trace_id: u64,
pub extension_id: Option<String>,
}Expand description
A hostcall request enqueued from JavaScript.
Fields§
§call_id: StringUnique identifier for correlation.
kind: HostcallKindType of hostcall.
payload: ValueJSON payload for the hostcall.
trace_id: u64Trace ID for correlation with macrotask.
extension_id: Option<String>Active extension id (when known) for policy/log correlation.
Implementations§
Source§impl HostcallRequest
impl HostcallRequest
pub const fn method(&self) -> &'static str
pub fn required_capability(&self) -> &'static str
pub fn io_uring_capability_class(&self) -> HostcallCapabilityClass
pub fn io_uring_io_hint(&self) -> HostcallIoHint
pub fn io_uring_lane_input( &self, queue_depth: usize, force_compat_lane: bool, ) -> IoUringLaneDecisionInput
Sourcepub fn params_for_hash(&self) -> Value
pub fn params_for_hash(&self) -> Value
Build the canonical params shape for hashing.
Canonical shapes (must match hostcall_request_to_payload() in extensions.rs):
tool:{ "name": <tool_name>, "input": <payload> }exec:{ "cmd": <string>, ...payload_fields }http: payload passthroughsession/ui/events:{ "op": <string>, ...payload_fields }(flattened)
For non-object args to session/ui/events, payload is preserved under
a reserved "payload" key (e.g. { "op": "set_status", "payload": "ready" }).
pub fn params_hash(&self) -> String
Trait Implementations§
Source§impl Clone for HostcallRequest
impl Clone for HostcallRequest
Source§fn clone(&self) -> HostcallRequest
fn clone(&self) -> HostcallRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HostcallRequest
impl Debug for HostcallRequest
Source§impl QueueTenant for HostcallRequest
impl QueueTenant for HostcallRequest
fn tenant_key(&self) -> Option<&str>
Auto Trait Implementations§
impl Freeze for HostcallRequest
impl RefUnwindSafe for HostcallRequest
impl Send for HostcallRequest
impl Sync for HostcallRequest
impl Unpin for HostcallRequest
impl UnsafeUnpin for HostcallRequest
impl UnwindSafe for HostcallRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more