Struct Full
pub struct Full<D> { /* private fields */ }
A body that consists of a single chunk.
Implementations
impl<D> Full<D>
fn into_inner(self) -> Option<D>Consumes this
Full, returning the wrapped value.If this body has already been polled, this returns
None.Examples
# use Full; const DATA: & = b"hello"; let full = new; assert_eq!;
impl<D> Full<D>
where
D: Buf,
fn new(data: D) -> SelfCreate a new
Full.
Trait Implementations
impl<'__pin, D> Unpin for Full<D>
where
PinnedFieldsOf<__Origin<'__pin, D>>: Unpin,
impl<D> Body for Full<D>
where
D: Buf,
type Data = D;type Error = never;fn poll_frame(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option<Result<Frame<D>, Self::Error>>>fn is_end_stream(&self) -> boolfn size_hint(&self) -> SizeHint
impl<D> Default for Full<D>
where
D: Buf,
fn default() -> SelfCreate an empty
Full.
impl<D> From<&'static [u8]> for Full<D>
where
D: Buf + From<&'static [u8]>,
fn from(slice: &'static [u8]) -> Self
impl<D> From<&'static str> for Full<D>
where
D: Buf + From<&'static str>,
fn from(slice: &'static str) -> Self
impl<D> From<Bytes> for Full<D>
where
D: Buf + From<Bytes>,
fn from(bytes: Bytes) -> Self
impl<D> From<String> for Full<D>
where
D: Buf + From<String>,
fn from(s: String) -> Self
impl<D> From<Vec<u8>> for Full<D>
where
D: Buf + From<Vec<u8>>,
fn from(vec: Vec<u8>) -> Self
impl<D, B> From<Cow<'static, B>> for Full<D>
where
D: Buf + From<&'static B> + From<B::Owned>,
B: ToOwned + ?Sized,
fn from(cow: Cow<'static, B>) -> Self
impl<D: Clone> Clone for Full<D>
fn clone(&self) -> Self
impl<D: Copy> Copy for Full<D>
impl<D: Debug> Debug for Full<D>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<D> Freeze for Full<D>
where
Option<D>: Freeze,
impl<D> RefUnwindSafe for Full<D>
where
Option<D>: RefUnwindSafe,
impl<D> Send for Full<D>
where
Option<D>: Send,
impl<D> Sync for Full<D>
where
Option<D>: Sync,
impl<D> UnsafeUnpin for Full<D>
where
Option<D>: UnsafeUnpin,
impl<D> UnwindSafe for Full<D>
where
Option<D>: UnwindSafe,
Blanket Implementations
impl<T> Any for Full<D>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> BodyExt for Full<D>
where
T: Body + ?Sized,
impl<T> Borrow<T> for Full<D>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Full<D>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Full<D>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Full<D>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Full<D>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Full<D>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Full<D>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Full<D>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>