Trait p25::bits::IterParams
[−]
[src]
pub trait IterParams { type Input; type Output; fn bits() -> usize; fn buffer() -> usize; fn shift() -> usize; fn to_byte(input: Self::Input) -> u8; fn to_output(bits: u8) -> Self::Output; fn post_shift() -> usize { ... } fn iterations() -> usize { ... } fn validate() { ... } }
Associated Types
Required Methods
fn bits() -> usize
Number of bits to consume at each iteration.
fn buffer() -> usize
Number of input symbols to consume when buffering.
fn shift() -> usize
Amount to shift buffer after loading an input symbol.
fn to_byte(input: Self::Input) -> u8
Convert input symbol to a byte.
fn to_output(bits: u8) -> Self::Output
Convert bits to output type.
Provided Methods
fn post_shift() -> usize
Amount to shift buffer after all buffering, so the bits are lined up at the MSB.
fn iterations() -> usize
Number of iterations before buffering.
fn validate()
Verify the parameters are supported.
Implementors
impl IterParams for DibitParams type Input = u8; type Output = Dibit;
impl IterParams for TribitParams type Input = u8; type Output = Tribit;
impl IterParams for HexbitParams type Input = u8; type Output = Hexbit;
impl IterParams for DibitByteParams type Input = Dibit; type Output = u8;
impl IterParams for TribitByteParams type Input = Tribit; type Output = u8;
impl IterParams for HexbitByteParams type Input = Hexbit; type Output = u8;