pub trait MutableField<'a>: Clone + Default {
// Required methods
fn decode(field: FieldView<'a>) -> Option<Self>;
fn detect(field: FieldView<'a>) -> Option<&'a [u32]>;
fn encode(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>;
// Provided methods
fn folds_when_present() -> bool
where Self: Sized { ... }
fn is_empty_field(&self) -> bool { ... }
fn omits_default_after_encode() -> bool
where Self: Sized { ... }
fn is_dirty(&self) -> bool { ... }
fn has_nested_dirty(&self) -> bool { ... }
}Expand description
Encoding and dirty-tracking contract implemented by mutable field values.
This trait is primarily implemented by generated bindings. Application code normally interacts with the generated field accessors instead.
Required Methods§
fn decode(field: FieldView<'a>) -> Option<Self>
fn detect(field: FieldView<'a>) -> Option<&'a [u32]>
fn encode(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>
Provided Methods§
fn folds_when_present() -> boolwhere
Self: Sized,
fn is_empty_field(&self) -> bool
fn omits_default_after_encode() -> boolwhere
Self: Sized,
fn is_dirty(&self) -> bool
fn has_nested_dirty(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".