pub struct Bytes<'d> { /* private fields */ }Expand description
Contiguous bytes derived from one exact request.
Projection cannot extend the request owner’s lifetime.
Implementations§
Trait Implementations§
Source§impl<'d, Ranges: Copy + 'd> Body<'d, Ranges> for Bytes<'d>
impl<'d, Ranges: Copy + 'd> Body<'d, Ranges> for Bytes<'d>
type Bound = Unbounded
type Storage = (Id<'d>, NonEmpty<Shared<State<'d>>>)
type Prepared = Option<<Bytes<'d> as Body<'d, Ranges>>::Storage>
fn len(&self) -> usize
fn as_slice(&self) -> Option<&[u8]>
fn is_empty(&self) -> bool
fn segments(&self) -> impl FusedIterator<Item: AsRef<[u8]>>
Auto Trait Implementations§
impl<'d> !RefUnwindSafe for Bytes<'d>
impl<'d> !Send for Bytes<'d>
impl<'d> !Sync for Bytes<'d>
impl<'d> !UnwindSafe for Bytes<'d>
impl<'d> Forget for Bytes<'d>
impl<'d> Freeze for Bytes<'d>where
*const () is !null: Freeze,
*const Header<Budget<'d>> is !null: Freeze,
PhantomData<(Header<Budget<'d>>, u32)>: Freeze,
*const Account<'d> is !null: Freeze,
PhantomData<(Account<'d>, u32)>: Freeze,
*const Registration<'d> is !null: Freeze,
PhantomData<(Registration<'d>, u32)>: Freeze,
*const Registration<'d, ()> is !null: Freeze,
PhantomData<(Registration<'d, ()>, u32)>: Freeze,
*const [u8] is !null: Freeze,
NonZero<u64>: Freeze,
PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: Freeze,
PhantomData<*mut ()>: Freeze,
impl<'d> Move for Bytes<'d>
impl<'d> Unpin for Bytes<'d>
impl<'d> UnsafeUnpin for Bytes<'d>where
*const () is !null: UnsafeUnpin,
*const Header<Budget<'d>> is !null: UnsafeUnpin,
PhantomData<(Header<Budget<'d>>, u32)>: UnsafeUnpin,
*const Account<'d> is !null: UnsafeUnpin,
PhantomData<(Account<'d>, u32)>: UnsafeUnpin,
*const Registration<'d> is !null: UnsafeUnpin,
PhantomData<(Registration<'d>, u32)>: UnsafeUnpin,
*const Registration<'d, ()> is !null: UnsafeUnpin,
PhantomData<(Registration<'d, ()>, u32)>: UnsafeUnpin,
*const [u8] is !null: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: UnsafeUnpin,
PhantomData<*mut ()>: UnsafeUnpin,
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