pub struct ConstSlice { /* private fields */ }
Expand description
A buffer of a constant size suitable for use in const contexts as a temporary replacement for slices.
Implementations§
Source§impl ConstSlice
impl ConstSlice
Sourcepub const fn from_slice(slice: &[u8]) -> Self
pub const fn from_slice(slice: &[u8]) -> Self
Convert a slice into a ConstSlice
.
Sourcepub const fn push_slice(self, slice: &[u8]) -> Self
pub const fn push_slice(self, slice: &[u8]) -> Self
Push a slice of bytes on to the buffer.
Sourcepub const fn push_other(self, other: Self) -> Self
pub const fn push_other(self, other: Self) -> Self
Push another ConstSlice
on to the current buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConstSlice
impl RefUnwindSafe for ConstSlice
impl Send for ConstSlice
impl Sync for ConstSlice
impl Unpin for ConstSlice
impl UnwindSafe for ConstSlice
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