pub struct FecCode { /* private fields */ }Implementations§
Source§impl FecCode
impl FecCode
pub fn new(k: usize, n: usize) -> Result<Self, FecError>
pub const fn k(&self) -> usize
pub const fn n(&self) -> usize
pub fn encode( &self, primary: &[Vec<u8>], block_size: usize, ) -> Result<Vec<Vec<u8>>, FecError>
pub fn recover_primary( &self, fragments: &mut [Option<Vec<u8>>], block_size: usize, ) -> Result<usize, FecError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FecCode
impl RefUnwindSafe for FecCode
impl Send for FecCode
impl Sync for FecCode
impl Unpin for FecCode
impl UnsafeUnpin for FecCode
impl UnwindSafe for FecCode
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