pub struct HostCallContext<'a> {
pub runtime_name: &'a str,
pub extension_id: Option<&'a str>,
pub tools: &'a ToolRegistry,
pub http: &'a HttpConnector,
pub manager: Option<ExtensionManager>,
pub policy: &'a ExtensionPolicy,
pub js_runtime: Option<&'a PiJsRuntime>,
pub interceptor: Option<&'a dyn HostcallInterceptor>,
}Expand description
Context for the shared hostcall dispatcher.
Carries the runtime resources needed to dispatch any hostcall, regardless of whether it originated from a JS extension, WASM component, or protocol message.
Fields§
§runtime_name: &'a strRuntime origin identifier (e.g. "js", "wasm", "protocol").
extension_id: Option<&'a str>Extension that initiated the call (for policy + logging).
tools: &'a ToolRegistryBuilt-in tool registry.
http: &'a HttpConnectorHTTP connector for outbound requests.
manager: Option<ExtensionManager>Extension manager for session/ui/events dispatch.
policy: &'a ExtensionPolicyPolicy governing capability access.
js_runtime: Option<&'a PiJsRuntime>Optional JS runtime for exec streaming.
interceptor: Option<&'a dyn HostcallInterceptor>Test interceptor (if any).
Auto Trait Implementations§
impl<'a> Freeze for HostCallContext<'a>
impl<'a> !RefUnwindSafe for HostCallContext<'a>
impl<'a> !Send for HostCallContext<'a>
impl<'a> !Sync for HostCallContext<'a>
impl<'a> Unpin for HostCallContext<'a>
impl<'a> UnsafeUnpin for HostCallContext<'a>
impl<'a> !UnwindSafe for HostCallContext<'a>
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> 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