pub struct FieldDef {
pub id: FieldId,
pub codec: FieldCodec,
pub change: ChangePolicy,
}Expand description
Field definition within a component.
Fields§
§id: FieldId§codec: FieldCodec§change: ChangePolicyImplementations§
Source§impl FieldDef
impl FieldDef
Sourcepub const fn new(id: FieldId, codec: FieldCodec) -> Self
pub const fn new(id: FieldId, codec: FieldCodec) -> Self
Creates a field definition with the default change policy.
Sourcepub const fn with_threshold(
id: FieldId,
codec: FieldCodec,
threshold_q: u32,
) -> Self
pub const fn with_threshold( id: FieldId, codec: FieldCodec, threshold_q: u32, ) -> Self
Creates a field definition with a threshold policy.
Sourcepub const fn change(self, change: ChangePolicy) -> Self
pub const fn change(self, change: ChangePolicy) -> Self
Sets the change policy for a field definition.
Trait Implementations§
impl Copy for FieldDef
impl Eq for FieldDef
impl StructuralPartialEq for FieldDef
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin for FieldDef
impl UnwindSafe for FieldDef
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