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 more