pub struct GraphFileValidator;Expand description
Graph file validation utilities
Implementations§
Source§impl GraphFileValidator
impl GraphFileValidator
Sourcepub fn validate_file_size(
file_size: u64,
persistent_header: &PersistentHeaderV2,
) -> NativeResult<()>
pub fn validate_file_size( file_size: u64, persistent_header: &PersistentHeaderV2, ) -> NativeResult<()>
Validate that the file size meets minimum requirements
Ensures the file is large enough for the header and any declared data. For native backend, we only require file to be large enough for actual data written.
Sourcepub fn verify_commit_marker(marker: u64) -> NativeResult<()>
pub fn verify_commit_marker(marker: u64) -> NativeResult<()>
Verify the commit marker indicates a clean commit state
Detects incomplete clustered commits by checking the commit marker. Returns error if the marker indicates an incomplete transaction.
Sourcepub const fn clean_commit_marker() -> u64
pub const fn clean_commit_marker() -> u64
Get the clean commit marker value
Sourcepub const fn commit_marker_offset() -> u64
pub const fn commit_marker_offset() -> u64
Get the commit marker offset in the header
CRITICAL: Commit marker is positioned AFTER the header region (bytes 0-79) to prevent collision with header fields. The header occupies bytes 0-79 (HEADER_SIZE=80), so the commit marker is at offset 80, immediately following the header.
Sourcepub fn calculate_minimum_expected_size(
persistent_header: &PersistentHeaderV2,
) -> u64
pub fn calculate_minimum_expected_size( persistent_header: &PersistentHeaderV2, ) -> u64
Calculate minimum expected file size based on header state
Auto Trait Implementations§
impl Freeze for GraphFileValidator
impl RefUnwindSafe for GraphFileValidator
impl Send for GraphFileValidator
impl Sync for GraphFileValidator
impl Unpin for GraphFileValidator
impl UnwindSafe for GraphFileValidator
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
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