pub struct ScannerErrorFactory;Expand description
Scanner-specific error factories
Implementations§
Source§impl ScannerErrorFactory
impl ScannerErrorFactory
Sourcepub fn wal_read_error(
file_path: &str,
offset: u64,
bytes_requested: u64,
bytes_read: Option<u64>,
message: impl Into<String>,
) -> RecoveryError
pub fn wal_read_error( file_path: &str, offset: u64, bytes_requested: u64, bytes_read: Option<u64>, message: impl Into<String>, ) -> RecoveryError
Create WAL file read error
Sourcepub fn wal_parse_error(
file_path: &str,
offset: u64,
record_type: &str,
expected_format: &str,
message: impl Into<String>,
) -> RecoveryError
pub fn wal_parse_error( file_path: &str, offset: u64, record_type: &str, expected_format: &str, message: impl Into<String>, ) -> RecoveryError
Create WAL file parse error
Sourcepub fn wal_header_error(
file_path: &str,
expected_version: &str,
actual_version: Option<&str>,
) -> RecoveryError
pub fn wal_header_error( file_path: &str, expected_version: &str, actual_version: Option<&str>, ) -> RecoveryError
Create WAL header validation error
Sourcepub fn index_scan_error(
file_path: &str,
index_offset: u64,
entry_count: u64,
failed_at_entry: Option<u64>,
message: impl Into<String>,
) -> RecoveryError
pub fn index_scan_error( file_path: &str, index_offset: u64, entry_count: u64, failed_at_entry: Option<u64>, message: impl Into<String>, ) -> RecoveryError
Create WAL index scan error
Sourcepub fn sequence_scan_error(
file_path: &str,
start_lsn: u64,
end_lsn: u64,
current_lsn: Option<u64>,
records_scanned: u64,
message: impl Into<String>,
) -> RecoveryError
pub fn sequence_scan_error( file_path: &str, start_lsn: u64, end_lsn: u64, current_lsn: Option<u64>, records_scanned: u64, message: impl Into<String>, ) -> RecoveryError
Create WAL sequence scan error
Sourcepub fn permission_error(
file_path: &str,
operation: &str,
required_permissions: &str,
) -> RecoveryError
pub fn permission_error( file_path: &str, operation: &str, required_permissions: &str, ) -> RecoveryError
Create file permission error
Sourcepub fn file_not_found_error(file_path: &str) -> RecoveryError
pub fn file_not_found_error(file_path: &str) -> RecoveryError
Create file not found error
Sourcepub fn disk_space_error(
file_path: &str,
operation: &str,
required_space: u64,
available_space: Option<u64>,
) -> RecoveryError
pub fn disk_space_error( file_path: &str, operation: &str, required_space: u64, available_space: Option<u64>, ) -> RecoveryError
Create disk space error
Sourcepub fn format_detection_error(
file_path: &str,
magic_bytes: Option<&[u8]>,
suspected_format: Option<&str>,
) -> RecoveryError
pub fn format_detection_error( file_path: &str, magic_bytes: Option<&[u8]>, suspected_format: Option<&str>, ) -> RecoveryError
Create format detection error
Sourcepub fn buffer_allocation_error(
operation: &str,
buffer_size: u64,
required_size: u64,
) -> RecoveryError
pub fn buffer_allocation_error( operation: &str, buffer_size: u64, required_size: u64, ) -> RecoveryError
Create buffer allocation error
Sourcepub fn initialization_error(
message: impl Into<String>,
component: &str,
file_path: Option<&str>,
) -> RecoveryError
pub fn initialization_error( message: impl Into<String>, component: &str, file_path: Option<&str>, ) -> RecoveryError
Create scanner initialization error
Sourcepub fn timeout_error(
operation: &str,
timeout_ms: u64,
elapsed_ms: u64,
file_path: &str,
) -> RecoveryError
pub fn timeout_error( operation: &str, timeout_ms: u64, elapsed_ms: u64, file_path: &str, ) -> RecoveryError
Create scanner timeout error
Auto Trait Implementations§
impl Freeze for ScannerErrorFactory
impl RefUnwindSafe for ScannerErrorFactory
impl Send for ScannerErrorFactory
impl Sync for ScannerErrorFactory
impl Unpin for ScannerErrorFactory
impl UnwindSafe for ScannerErrorFactory
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
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>
Converts
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>
Converts
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