pub trait GetField<F: Field>: Patch {
// Required methods
fn get_field(self) -> F::Type;
fn borrow_field(&self) -> &F::Type;
fn borrow_field_mut(&mut self) -> &mut F::Type;
}Expand description
Generic access to a patch’s fields
This enables generic code to check if a patch contains a certain field (for example the model’s primary key, see Identifiable) and gain access to it.
Required Methods§
Sourcefn borrow_field(&self) -> &F::Type
fn borrow_field(&self) -> &F::Type
Borrow the field
Sourcefn borrow_field_mut(&mut self) -> &mut F::Type
fn borrow_field_mut(&mut self) -> &mut F::Type
Borrow the field mutably
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".