pub struct WasmHostState {
pub table: ResourceTable,
pub wasi: WasiCtx,
pub properties: HashMap<String, Value>,
pub registry: Arc<Mutex<Registry>>,
pub call_depth: Arc<AtomicUsize>,
pub limits: StoreLimits,
pub state_store: StateStore,
pub capabilities: WasmCapabilities,
}Fields§
§table: ResourceTable§wasi: WasiCtx§properties: HashMap<String, Value>§registry: Arc<Mutex<Registry>>§call_depth: Arc<AtomicUsize>§limits: StoreLimits§state_store: StateStore§capabilities: WasmCapabilitiesTrait Implementations§
impl Host for WasmHostState
impl Host for WasmHostState
impl Host for WasmHostState
Source§impl HostWithStore<WasmHostState> for HasSelf<WasmHostState>
impl HostWithStore<WasmHostState> for HasSelf<WasmHostState>
Source§async fn camel_call(
store: &Accessor<WasmHostState, HasSelf<WasmHostState>>,
uri: String,
payload: String,
) -> Result<String, WasmError>
async fn camel_call( store: &Accessor<WasmHostState, HasSelf<WasmHostState>>, uri: String, payload: String, ) -> Result<String, WasmError>
Invoke any Camel endpoint asynchronously.
Returns the response body as a string (JSON-encoded for structured data).
TODO(WIT-009): Only string payloads are supported; binary/bytes support is deferred.
Source§async fn camel_poll(
store: &Accessor<WasmHostState, HasSelf<WasmHostState>>,
uri: String,
timeout_ms: u32,
) -> Result<String, WasmError>
async fn camel_poll( store: &Accessor<WasmHostState, HasSelf<WasmHostState>>, uri: String, timeout_ms: u32, ) -> Result<String, WasmError>
Poll an endpoint for a message asynchronously (pull model).
Returns the body as a string, or an error on timeout/failure.
Source§fn get_property(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
) -> Option<String>
fn get_property( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, ) -> Option<String>
Read a property from the host Exchange.
Source§fn set_property(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
value: String,
)
fn set_property( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, value: String, )
Write a property to the host Exchange.
Source§fn host_store(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
value: String,
) -> Result<(), WasmError>
fn host_store( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, value: String, ) -> Result<(), WasmError>
Store a value that persists across process() calls for this route endpoint.
State is scoped per endpoint — different routes using the same plugin
get independent state stores.
Source§impl HostWithStore<WasmHostState> for HasSelf<WasmHostState>
impl HostWithStore<WasmHostState> for HasSelf<WasmHostState>
Source§async fn camel_call(
store: &Accessor<WasmHostState, HasSelf<WasmHostState>>,
uri: String,
payload: String,
) -> Result<String, WasmError>
async fn camel_call( store: &Accessor<WasmHostState, HasSelf<WasmHostState>>, uri: String, payload: String, ) -> Result<String, WasmError>
Invoke any Camel endpoint asynchronously.
Returns the response body as a string (JSON-encoded for structured data).
TODO(WIT-009): Only string payloads are supported; binary/bytes support is deferred.
Source§async fn camel_poll(
store: &Accessor<WasmHostState, HasSelf<WasmHostState>>,
uri: String,
timeout_ms: u32,
) -> Result<String, WasmError>
async fn camel_poll( store: &Accessor<WasmHostState, HasSelf<WasmHostState>>, uri: String, timeout_ms: u32, ) -> Result<String, WasmError>
Poll an endpoint for a message asynchronously (pull model).
Returns the body as a string, or an error on timeout/failure.
Source§fn get_property(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
) -> Option<String>
fn get_property( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, ) -> Option<String>
Read a property from the host Exchange.
Source§fn set_property(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
value: String,
)
fn set_property( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, value: String, )
Write a property to the host Exchange.
Source§fn host_store(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
value: String,
) -> Result<(), WasmError>
fn host_store( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, value: String, ) -> Result<(), WasmError>
Store a value that persists across process() calls for this route endpoint.
State is scoped per endpoint — different routes using the same plugin
get independent state stores.
Source§impl HostWithStore<WasmHostState> for HasSelf<WasmHostState>
impl HostWithStore<WasmHostState> for HasSelf<WasmHostState>
Source§async fn camel_call(
store: &Accessor<WasmHostState, HasSelf<WasmHostState>>,
uri: String,
payload: String,
) -> Result<String, WasmError>
async fn camel_call( store: &Accessor<WasmHostState, HasSelf<WasmHostState>>, uri: String, payload: String, ) -> Result<String, WasmError>
Invoke any Camel endpoint asynchronously.
Returns the response body as a string (JSON-encoded for structured data).
TODO(WIT-009): Only string payloads are supported; binary/bytes support is deferred.
Source§async fn camel_poll(
store: &Accessor<WasmHostState, HasSelf<WasmHostState>>,
uri: String,
timeout_ms: u32,
) -> Result<String, WasmError>
async fn camel_poll( store: &Accessor<WasmHostState, HasSelf<WasmHostState>>, uri: String, timeout_ms: u32, ) -> Result<String, WasmError>
Poll an endpoint for a message asynchronously (pull model).
Returns the body as a string, or an error on timeout/failure.
Source§fn get_property(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
) -> Option<String>
fn get_property( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, ) -> Option<String>
Read a property from the host Exchange.
Source§fn set_property(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
value: String,
)
fn set_property( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, value: String, )
Write a property to the host Exchange.
Source§fn host_store(
store: Access<'_, WasmHostState, HasSelf<WasmHostState>>,
key: String,
value: String,
) -> Result<(), WasmError>
fn host_store( store: Access<'_, WasmHostState, HasSelf<WasmHostState>>, key: String, value: String, ) -> Result<(), WasmError>
Store a value that persists across process() calls for this route endpoint.
State is scoped per endpoint — different routes using the same plugin
get independent state stores.
Source§impl WasiView for WasmHostState
impl WasiView for WasmHostState
Source§fn ctx(&mut self) -> WasiCtxView<'_>
fn ctx(&mut self) -> WasiCtxView<'_>
Yields mutable access to the
WasiCtx configuration used for this
context.Auto Trait Implementations§
impl !RefUnwindSafe for WasmHostState
impl !Sync for WasmHostState
impl !UnwindSafe for WasmHostState
impl Freeze for WasmHostState
impl Send for WasmHostState
impl Unpin for WasmHostState
impl UnsafeUnpin for WasmHostState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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