pub struct Decoder {}Expand description
SSDV FEC decoder.
This struct represents the FEC decoder. The way to use the FEC decoder is
through the Decoder::decode associated function. The struct only exists
for namespacing this function.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn decode<'a, S: SSDVPacket>(
input: &mut [S],
output: &'a mut [S],
) -> Result<&'a mut [S], DecoderError>
pub fn decode<'a, S: SSDVPacket>( input: &mut [S], output: &'a mut [S], ) -> Result<&'a mut [S], DecoderError>
Decodes a list of SSDV packets to obtain the original SSDV image.
This function receives a slice input containing SSDV packets from a
single image, and, if possible, obtains the original SSDV image and
writes the results to the beginning of the output slice, returning the
subslice of output that contains the image packets. If decoding is not
possible, the function returns an error.
The packets in input can be in any order and can have duplicates. The
function works in-place in the input slice, modifying its contents.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
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