pub enum HostFutureTrailers {
Waiting(HostIncomingBody),
Done(Result<Option<FieldMap>, ErrorCode>),
Consumed,
}
Expand description
The concrete type behind a wasi:http/types/future-trailers
resource.
Variants§
Waiting(HostIncomingBody)
Trailers aren’t here yet.
This state represents two similar states:
-
The body is here and ready for reading and we’re waiting to read trailers. This can happen for example when the actual body wasn’t read or if the body was only partially read.
-
The body is being read by something else and we’re waiting for that to send us the trailers (or the body itself). This state will get entered when the body stream is dropped for example. If the body stream reads the trailers itself it will also send a message over here with the trailers.
Done(Result<Option<FieldMap>, ErrorCode>)
Trailers are ready and here they are.
Note that Ok(None)
means that there were no trailers for this request
while Ok(Some(_))
means that trailers were found in the request.
Consumed
Trailers have been consumed by future-trailers.get
.
Trait Implementations§
source§impl Debug for HostFutureTrailers
impl Debug for HostFutureTrailers
source§impl Subscribe for HostFutureTrailers
impl Subscribe for HostFutureTrailers
Auto Trait Implementations§
impl Freeze for HostFutureTrailers
impl !RefUnwindSafe for HostFutureTrailers
impl Send for HostFutureTrailers
impl Sync for HostFutureTrailers
impl Unpin for HostFutureTrailers
impl !UnwindSafe for HostFutureTrailers
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
source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self
file descriptor.source§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,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self
file descriptor. Read moresource§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