Skip to main content

StructMergeRef

Trait StructMergeRef 

Source
pub trait StructMergeRef<Src> {
    // Required method
    fn merge_ref(&mut self, src: &Src);
}
Expand description

Merge another borrowed struct into Self.

All fields to be merged on the borrowed struct have to implement Clone.

Required Methods§

Source

fn merge_ref(&mut self, src: &Src)

Merge the given struct into Self.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<Target, Src: StructMergeIntoRef<Target>> StructMergeRef<Src> for Target

Implement the StructMergeRef trait for all types that provide StructMergeInto for it.