pub struct HostState { /* private fields */ }Expand description
Host state passed into the wasmtime store.
Trait Implementations§
impl Host for &mut HostState
Both interfaces get a Host impl on &mut HostState, and on nothing
else, for the same reason act:credentials does: skip_mut_forwarding_impls
suppresses bindgen’s blanket &mut T forwarding impls, and add_to_linker
requires for<'a> D::Data<'a>: Host — which is &'a mut HostState under
HasSelf<HostState>, and that is the whole of the requirement.
impl Host for &mut HostState
impl Host for HostState
Host is implemented for &mut HostState on both interfaces:
skip_mut_forwarding_impls suppresses bindgen’s blanket &mut T
forwarding impls, while both store::add_to_linker and
types::add_to_linker require for<'a> D::Data<'a>: Host — which is
&'a mut HostState under HasSelf<HostState>.
impl Host for &mut HostState
impl Host for &mut HostState
Source§impl HostWithStore<HostState> for HasSelf<HostState>
impl HostWithStore<HostState> for HasSelf<HostState>
Source§async fn request(
accessor: &Accessor<HostState, Self>,
req: ConsentRequest,
_meta: Metadata,
) -> Decision
async fn request( accessor: &Accessor<HostState, Self>, req: ConsentRequest, _meta: Metadata, ) -> Decision
meta is accepted and not read. Its job in ACT-CONSENT.md §7.1 is to
anchor the decision to a session, and the record this emits is already
anchored: emit_cap_decision writes an event inside the in-flight
act.tool_call span, which carries act.session.id. It never selects
policy — that is keyed on the class and the key alone — so reading it
here could only widen what a guest-supplied value can influence.
Source§impl HostWithStore<HostState> for HasSelf<HostState>
impl HostWithStore<HostState> for HasSelf<HostState>
Source§async fn list_secrets(
accessor: &Accessor<HostState, Self>,
session: Option<String>,
) -> Result<Vec<SecretInfo>, SecretError>
async fn list_secrets( accessor: &Accessor<HostState, Self>, session: Option<String>, ) -> Result<Vec<SecretInfo>, SecretError>
Source§async fn get_secret(
accessor: &Accessor<HostState, Self>,
session: String,
want: SecretRequest,
) -> Result<Secret, SecretError>
async fn get_secret( accessor: &Accessor<HostState, Self>, session: String, want: SecretRequest, ) -> Result<Secret, SecretError>
Source§impl WasiHttpView for HostState
impl WasiHttpView for HostState
Source§fn http(&mut self) -> WasiHttpCtxView<'_>
fn http(&mut self) -> WasiHttpCtxView<'_>
Auto Trait Implementations§
impl !RefUnwindSafe for HostState
impl !Sync for HostState
impl !UnwindSafe for HostState
impl Freeze for HostState
impl Send for HostState
impl Unpin for HostState
impl UnsafeUnpin for HostState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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