Skip to main content

PatchField

Trait PatchField 

Source
pub trait PatchField<F> {
    // Required method
    fn apply_to(self, field: &mut F);
}
Expand description

A field of a merge patch, applied to the model’s field of type F.

Option<P> replaces the field when it holds a value; Patch<P> also clears an Option field when null. P converts into the field’s type.

Required Methods§

Source

fn apply_to(self, field: &mut F)

Apply the patch’s field to the model’s field.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<P, F> PatchField<F> for Option<P>
where P: Into<F>,

Source§

fn apply_to(self, field: &mut F)

Implementors§

Source§

impl<P, F> PatchField<Option<F>> for Patch<P>
where P: Into<F>,