pub struct Key2(/* private fields */);
Expand description
A compacted 2-byte key
This is defined specifically as the following conversion:
- Key8 bytes (
[u8; 8]
):[a, b, c, d, e, f, g, h]
- Key4 bytes (
[u8; 2]
):[a ^ b ^ c ^ d, e ^ f ^ g ^ h]
Implementations§
Source§impl Key2
impl Key2
Sourcepub const fn from_key4(value: Key4) -> Self
pub const fn from_key4(value: Key4) -> Self
Convert from a 4-byte key
This is a lossy conversion, and can never fail
Sourcepub const fn const_cmp(&self, other: &Self) -> bool
pub const fn const_cmp(&self, other: &Self) -> bool
Compare if the keys match in a const context
Trait Implementations§
impl Copy for Key2
impl StructuralPartialEq for Key2
Auto Trait Implementations§
impl Freeze for Key2
impl RefUnwindSafe for Key2
impl Send for Key2
impl Sync for Key2
impl Unpin for Key2
impl UnwindSafe for Key2
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