pub struct Bytes<'a, const N: usize, B>{ /* private fields */ }Expand description
§Bytes
This struct can be converted from:
- A single slice of bytes.
- A slice of slices of bytes.
- An array of slices of bytes.
You rarely use this struct directly. Some functions in this project look like below example:
use zeros::Bytes;
fn some<'a, const N: usize, B, B0>(bytes: B)
where B: Into<Bytes<'a, N, B0>>, B0: AsRef<[u8]> + 'a {
}
some("data");
some(["test", "data"]);
some([0, 1, 2]);
some(&[[3, 4, 5], [6, 7, 8]][..]);So it’s just a convenient way for you to provide your data to those functions.
Trait Implementations§
Auto Trait Implementations§
impl<'a, const N: usize, B> Freeze for Bytes<'a, N, B>where
B: Freeze,
impl<'a, const N: usize, B> RefUnwindSafe for Bytes<'a, N, B>where
B: RefUnwindSafe,
impl<'a, const N: usize, B> Send for Bytes<'a, N, B>
impl<'a, const N: usize, B> Sync for Bytes<'a, N, B>where
B: Sync,
impl<'a, const N: usize, B> Unpin for Bytes<'a, N, B>where
B: Unpin,
impl<'a, const N: usize, B> UnwindSafe for Bytes<'a, N, B>where
B: UnwindSafe + RefUnwindSafe,
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