pub struct HttpState { /* private fields */ }
Expand description
Experimental HTTP extension object for Wasmtime.
Implementations
sourceimpl HttpState
impl HttpState
sourcepub const MODULE: &'static str = "wasi_experimental_http"
pub const MODULE: &'static str = "wasi_experimental_http"
Module the HTTP extension is going to be defined as.
sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Create a new HTTP extension object.
allowed_hosts
may be None
(no outbound connections allowed)
or a list of allowed host names.
pub fn add_to_linker<T>(
&self,
linker: &mut Linker<T>,
get_cx: impl Fn(&T) -> HttpCtx + Send + Sync + 'static
) -> Result<(), Error>
Auto Trait Implementations
impl RefUnwindSafe for HttpState
impl Send for HttpState
impl Sync for HttpState
impl Unpin for HttpState
impl UnwindSafe for HttpState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more