usesuper::{Body, SizeHint}; use bytes::Buf; use http::HeaderMap; use std::{
convert::Infallible,
fmt,
marker::PhantomData,
pin::Pin,
task::{Context, Poll},
};
/// A body that is always empty. pubstruct Empty<D> {
_marker: PhantomData<fn() -> D>,
}
impl<D> Empty<D> { /// Create a new `Empty`. pubfn new() -> Self { Self::default()
}
}
impl<D: Buf> Body for Empty<D> { type Data = D; type Error = Infallible;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.