#[repr(C, align(64))]pub struct Block(pub [u8; 64]);Expand description
64 bytes on a 64-byte boundary: the unit the calls read, so every
message starts on a cache line. A Batch holds its messages in
blocks, each message starting a block and taking whole blocks (one for
an empty message).
§Trait implementations
Cloneduplicates all 64 bytes in another aligned block.Copypreserves every byte, including any padding of a message within the block.Debugprints every byte in hexadecimal, including message padding.Eqtreats blocks as equal exactly when their byte arrays agree.PartialEqcompares all contents as ordinary byte arrays, without a constant-time guarantee.
Tuple Fields§
§0: [u8; 64]Implementations§
Source§impl Block
impl Block
Sourcepub fn bytes_mut(blocks: &mut [Block]) -> &mut [u8] ⓘ
pub fn bytes_mut(blocks: &mut [Block]) -> &mut [u8] ⓘ
The blocks’ bytes, in order, for writing.
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<&[Block]>
pub fn from_bytes(bytes: &[u8]) -> Option<&[Block]>
bytes as blocks, without a copy, when they start on a 64-byte
boundary and are whole blocks (bytes already in place, such as a
mapped file’s records), or are empty: None otherwise.
Trait Implementations§
impl Copy for Block
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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