pub struct ValidationErrorFactory;Expand description
Validation-specific error factories
Implementations§
Source§impl ValidationErrorFactory
impl ValidationErrorFactory
Sourcepub fn v2_format_error(
message: impl Into<String>,
expected_format: &str,
actual_format: Option<&str>,
) -> RecoveryError
pub fn v2_format_error( message: impl Into<String>, expected_format: &str, actual_format: Option<&str>, ) -> RecoveryError
Create V2 format validation error
Sourcepub fn checksum_error(
lsn: u64,
expected_checksum: u64,
actual_checksum: u64,
algorithm: &str,
) -> RecoveryError
pub fn checksum_error( lsn: u64, expected_checksum: u64, actual_checksum: u64, algorithm: &str, ) -> RecoveryError
Create checksum validation error
Sourcepub fn consistency_error(
message: impl Into<String>,
node_count_mismatch: Option<(u64, u64)>,
edge_count_mismatch: Option<(u64, u64)>,
) -> RecoveryError
pub fn consistency_error( message: impl Into<String>, node_count_mismatch: Option<(u64, u64)>, edge_count_mismatch: Option<(u64, u64)>, ) -> RecoveryError
Create consistency validation error
Sourcepub fn structural_error(
message: impl Into<String>,
record_type: &str,
field_name: &str,
expected_type: &str,
) -> RecoveryError
pub fn structural_error( message: impl Into<String>, record_type: &str, field_name: &str, expected_type: &str, ) -> RecoveryError
Create structural validation error
Sourcepub fn range_error(
message: impl Into<String>,
field_name: &str,
value: u64,
min_allowed: u64,
max_allowed: u64,
) -> RecoveryError
pub fn range_error( message: impl Into<String>, field_name: &str, value: u64, min_allowed: u64, max_allowed: u64, ) -> RecoveryError
Create range validation error
Sourcepub fn dependency_error(
message: impl Into<String>,
dependent_type: &str,
dependency_type: &str,
dependency_id: u64,
) -> RecoveryError
pub fn dependency_error( message: impl Into<String>, dependent_type: &str, dependency_type: &str, dependency_id: u64, ) -> RecoveryError
Create dependency validation error
Sourcepub fn integrity_error(
message: impl Into<String>,
lsn_range: Option<(u64, u64)>,
affected_records: u64,
) -> RecoveryError
pub fn integrity_error( message: impl Into<String>, lsn_range: Option<(u64, u64)>, affected_records: u64, ) -> RecoveryError
Create integrity validation error
Sourcepub fn schema_error(
message: impl Into<String>,
expected_version: &str,
actual_version: &str,
) -> RecoveryError
pub fn schema_error( message: impl Into<String>, expected_version: &str, actual_version: &str, ) -> RecoveryError
Create schema validation error
Auto Trait Implementations§
impl Freeze for ValidationErrorFactory
impl RefUnwindSafe for ValidationErrorFactory
impl Send for ValidationErrorFactory
impl Sync for ValidationErrorFactory
impl Unpin for ValidationErrorFactory
impl UnwindSafe for ValidationErrorFactory
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