Merge

Trait Merge 

Source
pub trait Merge<Other = Self> {
    // Required method
    fn merge(&self, other: Other) -> Self;
}
Expand description

The Merge trait allows merging two structs.

Required Methods§

Source

fn merge(&self, other: Other) -> Self

Returns a copy of the original struct where the values of all fields set in other replace the matching fields in the copy of self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§