Struct networkcoding::vandermonde_lc::encoder::VLCEncoder

source ·
pub struct VLCEncoder { /* private fields */ }

Implementations§

source§

impl VLCEncoder

source

pub fn new(symbol_size: usize, max_window_size: usize) -> VLCEncoder

source

pub fn protect_data( &mut self, data: Vec<u8>, output: &mut SourceSymbolMetadata, ) -> Result<usize, EncoderError>

source

pub fn generate_and_serialize_repair_symbol_up_to( &mut self, up_to: SourceSymbolMetadata, ) -> Result<Vec<u8>, EncoderError>

source

pub fn generate_and_serialize_repair_symbol( &mut self, ) -> Result<Vec<u8>, EncoderError>

source

pub fn generate_and_serialize_repair_symbol_in_place( &mut self, output: &mut [u8], ) -> Result<usize, EncoderError>

source

pub fn generate_and_serialize_repair_symbol_in_place_up_to( &mut self, output: &mut [u8], up_to: SourceSymbolMetadata, ) -> Result<usize, EncoderError>

source

pub fn received_symbol( &mut self, metadata: &[u8], ) -> Result<usize, EncoderError>

source

pub fn symbol_size(&self) -> usize

source

pub fn can_send_repair_symbols(&self) -> bool

source

pub fn remove_up_to(&mut self, md: SourceSymbolMetadata)

source

pub fn next_metadata(&mut self) -> SourceSymbolMetadata

source

pub fn next_repair_symbol_size(&self, _up_to: SourceSymbolMetadata) -> usize

source

pub fn first_metadata(&self) -> Option<SourceSymbolMetadata>

source

pub fn last_metadata(&self) -> Option<SourceSymbolMetadata>

source

pub fn current_window_size(&self) -> usize

source

pub fn contains_symbol(&self, md: SourceSymbolMetadata) -> bool

source

pub fn get_sent_time(&self, md: SourceSymbolMetadata) -> Option<Instant>

source

pub fn symbol_landed(&mut self, md: SourceSymbolMetadata)

source

pub fn remove_landed_symbols(&mut self)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.