pub struct ArrayRefEncoder<'e, const N: usize> { /* private fields */ }Expand description
An encoder for a reference to an array.
This encoder borrows the array instead of taking ownership, avoiding a copy when the array is already available by reference (e.g., as a struct field).
Implementations§
Source§impl<'e, const N: usize> ArrayRefEncoder<'e, N>
impl<'e, const N: usize> ArrayRefEncoder<'e, N>
Sourcepub const fn without_length_prefix(arr: &'e [u8; N]) -> Self
pub const fn without_length_prefix(arr: &'e [u8; N]) -> Self
Constructs an encoder which encodes the array reference with no length prefix.
Trait Implementations§
Source§impl<const N: usize> Encoder for ArrayRefEncoder<'_, N>
impl<const N: usize> Encoder for ArrayRefEncoder<'_, N>
Auto Trait Implementations§
impl<'e, const N: usize> Freeze for ArrayRefEncoder<'e, N>
impl<'e, const N: usize> RefUnwindSafe for ArrayRefEncoder<'e, N>
impl<'e, const N: usize> Send for ArrayRefEncoder<'e, N>
impl<'e, const N: usize> Sync for ArrayRefEncoder<'e, N>
impl<'e, const N: usize> Unpin for ArrayRefEncoder<'e, N>
impl<'e, const N: usize> UnsafeUnpin for ArrayRefEncoder<'e, N>
impl<'e, const N: usize> UnwindSafe for ArrayRefEncoder<'e, N>
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