pub struct BlockIdentity {
pub table_id: u64,
pub block_type: BlockType,
pub dict_id: u32,
pub window_log: u8,
}Expand description
Identifies a block for encryption AAD and audit purposes.
Carried through the Block I/O API instead of separate
block_type / aad: &[u8] arguments — see the module
docstring for the rationale.
Fields§
§table_id: u64Identifier of the owning store unit — for SST blocks this is
the per-tree [crate::TableId] (a u64 alias); for blob
files it is the crate::vlog::BlobFileId (also a u64
alias). Bound into the AAD so a block cannot be substituted for
one from a different table. The owning tree id is deliberately
NOT part of the identity (it is process-ephemeral, not durable
across reopen); cross-tree substitution is prevented by per-tree
key isolation instead. See the module docstring.
block_type: BlockTypeWhether this is a Data, Filter, Index, or Meta block.
Was previously a separate block_type: BlockType
argument on the Block API; now lives here so the call site
only computes one context value.
dict_id: u32Zstd dictionary id used for this block, or 0 if no
dictionary applies. Binds the block to a specific
dictionary version so that decompressing with a different
dictionary (whether by mistake or by attack) surfaces as
an AEAD authentication failure rather than as silently
wrong plaintext.
window_log: u8Zstd window_log advertised in the frame header, or 0 if
no zstd compression applies. Binds the block to a
specific decompression-memory budget; attempts to substitute
a block with a different window_log (a known “window bomb”
vector) fail AEAD authentication.
Trait Implementations§
Source§impl Clone for BlockIdentity
impl Clone for BlockIdentity
Source§fn clone(&self) -> BlockIdentity
fn clone(&self) -> BlockIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BlockIdentity
Auto Trait Implementations§
impl Freeze for BlockIdentity
impl RefUnwindSafe for BlockIdentity
impl Send for BlockIdentity
impl Sync for BlockIdentity
impl Unpin for BlockIdentity
impl UnsafeUnpin for BlockIdentity
impl UnwindSafe for BlockIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more