pub struct ContentAddressingSystem { /* private fields */ }Expand description
Main content addressing system
Implementations§
Source§impl ContentAddressingSystem
impl ContentAddressingSystem
Sourcepub async fn store_content(
&mut self,
content: impl AsyncRead + Unpin,
) -> Result<ContentAddress>
pub async fn store_content( &mut self, content: impl AsyncRead + Unpin, ) -> Result<ContentAddress>
Store content and return its address
Sourcepub async fn retrieve_content(
&self,
address: &ContentAddress,
) -> Result<Vec<u8>>
pub async fn retrieve_content( &self, address: &ContentAddress, ) -> Result<Vec<u8>>
Retrieve content by address
Sourcepub async fn verify_integrity(&self, address: &ContentAddress) -> Result<bool>
pub async fn verify_integrity(&self, address: &ContentAddress) -> Result<bool>
Verify content integrity without retrieval
Sourcepub async fn get_chunk_info(
&self,
address: &ContentAddress,
) -> Result<ChunkMetadata>
pub async fn get_chunk_info( &self, address: &ContentAddress, ) -> Result<ChunkMetadata>
Get chunk metadata
Sourcepub async fn get_dedup_stats(&self) -> DedupStatistics
pub async fn get_dedup_stats(&self) -> DedupStatistics
Get deduplication statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContentAddressingSystem
impl !RefUnwindSafe for ContentAddressingSystem
impl Send for ContentAddressingSystem
impl Sync for ContentAddressingSystem
impl Unpin for ContentAddressingSystem
impl !UnwindSafe for ContentAddressingSystem
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