Trait fj_kernel::partial::HasPartial
source · 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§
Provided Methods§
sourcefn partial() -> Self::Partial
fn partial() -> Self::Partial
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.
sourcefn to_partial(&self) -> Self::Partial
fn to_partial(&self) -> Self::Partial
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.