pub struct DefaultWasiHttpCtx;
Available on crate features
p3
and default-send-request
only.Expand description
Default implementation of WasiHttpCtx.
Trait Implementations§
Source§impl Clone for DefaultWasiHttpCtx
impl Clone for DefaultWasiHttpCtx
Source§fn clone(&self) -> DefaultWasiHttpCtx
fn clone(&self) -> DefaultWasiHttpCtx
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 Default for DefaultWasiHttpCtx
impl Default for DefaultWasiHttpCtx
Source§fn default() -> DefaultWasiHttpCtx
fn default() -> DefaultWasiHttpCtx
Returns the “default value” for a type. Read more
Source§impl WasiHttpCtx for DefaultWasiHttpCtx
impl WasiHttpCtx for DefaultWasiHttpCtx
Source§fn is_forbidden_header(&mut self, name: &HeaderName) -> bool
fn is_forbidden_header(&mut self, name: &HeaderName) -> bool
Whether a given header should be considered forbidden and not allowed.
Source§fn is_supported_scheme(&mut self, scheme: &Scheme) -> bool
fn is_supported_scheme(&mut self, scheme: &Scheme) -> bool
Whether a given scheme should be considered supported. Read more
Source§fn set_host_header(&mut self) -> bool
fn set_host_header(&mut self) -> bool
Whether to set
host
header in the request passed to send_request
.Source§fn default_scheme(&mut self) -> Option<Scheme>
fn default_scheme(&mut self) -> Option<Scheme>
Scheme to default to, when not set by the guest. Read more
Source§fn send_request(
&mut self,
request: Request<BoxBody<Bytes, ErrorCode>>,
options: Option<RequestOptions>,
fut: Box<dyn Future<Output = Result<(), ErrorCode>> + Send>,
) -> Box<dyn Future<Output = Result<(Response<BoxBody<Bytes, ErrorCode>>, Box<dyn Future<Output = Result<(), ErrorCode>> + Send>), TrappableError<ErrorCode>>> + Send>
fn send_request( &mut self, request: Request<BoxBody<Bytes, ErrorCode>>, options: Option<RequestOptions>, fut: Box<dyn Future<Output = Result<(), ErrorCode>> + Send>, ) -> Box<dyn Future<Output = Result<(Response<BoxBody<Bytes, ErrorCode>>, Box<dyn Future<Output = Result<(), ErrorCode>> + Send>), TrappableError<ErrorCode>>> + Send>
Send an outgoing request. Read more
Auto Trait Implementations§
impl Freeze for DefaultWasiHttpCtx
impl RefUnwindSafe for DefaultWasiHttpCtx
impl Send for DefaultWasiHttpCtx
impl Sync for DefaultWasiHttpCtx
impl Unpin for DefaultWasiHttpCtx
impl UnwindSafe for DefaultWasiHttpCtx
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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