pub trait HasPartial {
    type Partial: Partial<Full = Self>;

    fn partial() -> Self::Partial { ... }
    fn to_partial(&self) -> Self::Partial { ... }
}
Expand description

Implemented for objects that a partial object type exists for

Required Associated Types§

The type representing the partial variant of this object

Provided Methods§

Create an empty partial variant of this object

This function exists just for convenience, and will just return a Default version of the partial object.

Convert this object into its partial variant

All fields of the partial variant are set from this object. This is useful when creating a new object that needs to share parts of an existing one.

Implementors§