pub struct BytesConst<'a, const SIZE: usize>(/* private fields */);Expand description
A representation of a statically borrowed or owned array
Implementations§
Source§impl<'a, const SIZE: usize> BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> BytesConst<'a, SIZE>
Sourcepub fn new<T: Into<BytesConst<'a, SIZE>>>(v: T) -> Self
pub fn new<T: Into<BytesConst<'a, SIZE>>>(v: T) -> Self
Create a new set of bytes
Sourcepub fn into_inner(self) -> Cow<'a, [u8; SIZE]>
pub fn into_inner(self) -> Cow<'a, [u8; SIZE]>
Returns the underlying Cow
Sourcepub fn into_owned(self) -> [u8; SIZE]
pub fn into_owned(self) -> [u8; SIZE]
Returns the underlying byte vec. Copies if borrowed.
Trait Implementations§
Source§impl<'a, const SIZE: usize> Clone for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Clone for BytesConst<'a, SIZE>
Source§fn clone(&self) -> BytesConst<'a, SIZE>
fn clone(&self) -> BytesConst<'a, SIZE>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, const SIZE: usize> Debug for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Debug for BytesConst<'a, SIZE>
Source§impl<'a, const SIZE: usize> Deref for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Deref for BytesConst<'a, SIZE>
Source§impl<'a, const SIZE: usize> Hash for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Hash for BytesConst<'a, SIZE>
Source§impl<'a, const SIZE: usize> PartialEq for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> PartialEq for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Eq for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> StructuralPartialEq for BytesConst<'a, SIZE>
Auto Trait Implementations§
impl<'a, const SIZE: usize> Freeze for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> RefUnwindSafe for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Send for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Sync for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> Unpin for BytesConst<'a, SIZE>
impl<'a, const SIZE: usize> UnwindSafe for BytesConst<'a, SIZE>
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