pub struct ErasureCoding {}
Expand description
Erasure coding abstraction.
Supports creation of parity records and recovery of missing data.
Implementations§
Source§impl ErasureCoding
impl ErasureCoding
Sourcepub fn extend<'a, SourceIter, ParityIter, SourceBytes, ParityBytes>(
&self,
source: SourceIter,
parity: ParityIter,
) -> Result<(), ErasureCodingError>where
SourceIter: TrustedLen<Item = SourceBytes>,
ParityIter: TrustedLen<Item = ParityBytes>,
SourceBytes: AsRef<[u8]> + 'a,
ParityBytes: AsMut<[u8]> + 'a,
pub fn extend<'a, SourceIter, ParityIter, SourceBytes, ParityBytes>(
&self,
source: SourceIter,
parity: ParityIter,
) -> Result<(), ErasureCodingError>where
SourceIter: TrustedLen<Item = SourceBytes>,
ParityIter: TrustedLen<Item = ParityBytes>,
SourceBytes: AsRef<[u8]> + 'a,
ParityBytes: AsMut<[u8]> + 'a,
Extend sources using erasure coding
Sourcepub fn recover<'a, SourceIter, ParityIter>(
&self,
source: SourceIter,
parity: ParityIter,
) -> Result<(), ErasureCodingError>where
SourceIter: TrustedLen<Item = RecoveryShardState<&'a [u8], &'a mut [u8]>>,
ParityIter: TrustedLen<Item = RecoveryShardState<&'a [u8], &'a mut [u8]>>,
pub fn recover<'a, SourceIter, ParityIter>(
&self,
source: SourceIter,
parity: ParityIter,
) -> Result<(), ErasureCodingError>where
SourceIter: TrustedLen<Item = RecoveryShardState<&'a [u8], &'a mut [u8]>>,
ParityIter: TrustedLen<Item = RecoveryShardState<&'a [u8], &'a mut [u8]>>,
Recover missing shards
Trait Implementations§
Source§impl Clone for ErasureCoding
impl Clone for ErasureCoding
Source§fn clone(&self) -> ErasureCoding
fn clone(&self) -> ErasureCoding
Returns a copy 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 moreSource§impl Debug for ErasureCoding
impl Debug for ErasureCoding
Auto Trait Implementations§
impl Freeze for ErasureCoding
impl RefUnwindSafe for ErasureCoding
impl Send for ErasureCoding
impl Sync for ErasureCoding
impl Unpin for ErasureCoding
impl UnwindSafe for ErasureCoding
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