pub struct DataIntegrity { /* private fields */ }Expand description
Data integrity system for corruption detection and verification
Implementations§
Source§impl DataIntegrity
impl DataIntegrity
Sourcepub fn with_config(config: IntegrityConfig) -> Self
pub fn with_config(config: IntegrityConfig) -> Self
Create a new data integrity system with custom configuration
Sourcepub async fn initialize(&mut self) -> Result<(), IntegrityError>
pub async fn initialize(&mut self) -> Result<(), IntegrityError>
Initialize the data integrity system
Sourcepub async fn shutdown(&mut self) -> Result<(), IntegrityError>
pub async fn shutdown(&mut self) -> Result<(), IntegrityError>
Shutdown the data integrity system
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if the system is initialized
Sourcepub async fn verify_integrity(
&self,
data: &[u8],
metadata: &DataMetadata,
) -> Result<IntegrityResult, IntegrityError>
pub async fn verify_integrity( &self, data: &[u8], metadata: &DataMetadata, ) -> Result<IntegrityResult, IntegrityError>
Verify data integrity
Sourcepub async fn generate_checksum(
&self,
data: &[u8],
) -> Result<String, IntegrityError>
pub async fn generate_checksum( &self, data: &[u8], ) -> Result<String, IntegrityError>
Generate checksum for data
Sourcepub async fn validate_data_format(
&self,
data: &[u8],
expected_format: &DataFormat,
) -> Result<bool, IntegrityError>
pub async fn validate_data_format( &self, data: &[u8], expected_format: &DataFormat, ) -> Result<bool, IntegrityError>
Validate data format
Sourcepub async fn get_stats(&self) -> IntegrityStats
pub async fn get_stats(&self) -> IntegrityStats
Get integrity statistics
Sourcepub async fn reset_stats(&self)
pub async fn reset_stats(&self)
Reset integrity statistics
Trait Implementations§
Source§impl Clone for DataIntegrity
impl Clone for DataIntegrity
Source§fn clone(&self) -> DataIntegrity
fn clone(&self) -> DataIntegrity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DataIntegrity
impl !RefUnwindSafe for DataIntegrity
impl Send for DataIntegrity
impl Sync for DataIntegrity
impl Unpin for DataIntegrity
impl !UnwindSafe for DataIntegrity
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