pub enum FieldCodec {
Bool,
UInt {
bits: u8,
},
SInt {
bits: u8,
},
VarUInt,
VarSInt,
FixedPoint(FixedPoint),
}Expand description
The encoding for a field (representation only).
Variants§
Bool
Boolean (1 bit).
UInt
Unsigned integer with fixed bit width.
SInt
Signed integer with fixed bit width.
VarUInt
Variable-length unsigned integer.
VarSInt
Variable-length signed integer (zigzag encoded).
FixedPoint(FixedPoint)
Fixed-point number with quantization.
Implementations§
Source§impl FieldCodec
impl FieldCodec
Sourcepub const fn fixed_point(min_q: i64, max_q: i64, scale: u32) -> Self
pub const fn fixed_point(min_q: i64, max_q: i64, scale: u32) -> Self
Creates a fixed-point field codec.
Trait Implementations§
Source§impl Clone for FieldCodec
impl Clone for FieldCodec
Source§fn clone(&self) -> FieldCodec
fn clone(&self) -> FieldCodec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldCodec
impl Debug for FieldCodec
Source§impl PartialEq for FieldCodec
impl PartialEq for FieldCodec
impl Copy for FieldCodec
impl Eq for FieldCodec
impl StructuralPartialEq for FieldCodec
Auto Trait Implementations§
impl Freeze for FieldCodec
impl RefUnwindSafe for FieldCodec
impl Send for FieldCodec
impl Sync for FieldCodec
impl Unpin for FieldCodec
impl UnwindSafe for FieldCodec
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