pub struct FieldCodec {
pub kind: FieldKind,
pub threshold: Option<f32>,
}Expand description
Codec configuration for a single field.
Fields§
§kind: FieldKindThe encoding kind.
threshold: Option<f32>Optional change threshold for delta encoding. If the difference is less than this threshold, the field is not sent.
Implementations§
Source§impl FieldCodec
impl FieldCodec
Sourcepub const fn fixed_point(min: f32, max: f32, bits: u8) -> Self
pub const fn fixed_point(min: f32, max: f32, bits: u8) -> Self
Creates a fixed-point field codec.
Sourcepub const fn with_threshold(self, threshold: f32) -> Self
pub const fn with_threshold(self, threshold: f32) -> Self
Sets the change threshold for delta encoding.
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 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