pub struct FixedBytes<const N: usize> { /* private fields */ }Expand description
Fixed-capacity byte value with a logical length.
Implementations§
Source§impl<const N: usize> FixedBytes<N>
impl<const N: usize> FixedBytes<N>
Sourcepub fn new(bytes: &[u8]) -> Result<Self, AccessError>
pub fn new(bytes: &[u8]) -> Result<Self, AccessError>
Creates a fixed-capacity byte value from a slice.
Sourcepub fn padded_slice(&self) -> &[u8; N]
pub fn padded_slice(&self) -> &[u8; N]
Returns the full padded storage buffer.
Trait Implementations§
Source§impl<const N: usize> Clone for FixedBytes<N>
impl<const N: usize> Clone for FixedBytes<N>
Source§fn clone(&self) -> FixedBytes<N>
fn clone(&self) -> FixedBytes<N>
Returns a duplicate 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<const N: usize> Debug for FixedBytes<N>
impl<const N: usize> Debug for FixedBytes<N>
Source§impl<const N: usize> PartialEq for FixedBytes<N>
impl<const N: usize> PartialEq for FixedBytes<N>
impl<const N: usize> Copy for FixedBytes<N>
impl<const N: usize> Eq for FixedBytes<N>
impl<const N: usize> StructuralPartialEq for FixedBytes<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for FixedBytes<N>
impl<const N: usize> RefUnwindSafe for FixedBytes<N>
impl<const N: usize> Send for FixedBytes<N>
impl<const N: usize> Sync for FixedBytes<N>
impl<const N: usize> Unpin for FixedBytes<N>
impl<const N: usize> UnsafeUnpin for FixedBytes<N>
impl<const N: usize> UnwindSafe for FixedBytes<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