Struct reed_solomon::Buffer
[−]
[src]
pub struct Buffer { /* fields omitted */ }
Buffer for block encoded data
Example
use reed_solomon::Buffer; let buffer = Buffer::from_slice(&[1, 2, 3, 4], 2); assert_eq!(&[1, 2], buffer.data()); assert_eq!(&[3, 4], buffer.ecc());Run
Methods
impl Buffer
[src]
fn from_polynom(poly: Polynom, data_len: usize) -> Self
Create buffer from internal polynom
fn from_slice(slice: &[u8], data_len: usize) -> Self
Create buffer from [u8] slice
fn data(&self) -> &[u8]
Slice with data of encoded block
fn ecc(&self) -> &[u8]
Slice with error correction core of encoced block
fn append(&mut self, rhs: &[u8])
Add byte string to the end of buffer
Trait Implementations
impl Debug for Buffer
[src]
impl Copy for Buffer
[src]
impl Clone for Buffer
[src]
fn clone(&self) -> Buffer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Deref for Buffer
[src]
type Target = Polynom
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl DerefMut for Buffer
[src]
fn deref_mut(&mut self) -> &mut Self::Target
The method called to mutably dereference a value