Skip to main content

default_partial

Function default_partial 

Source
pub fn default_partial(
    name: &str,
) -> Result<Partial<'static, false>, ComponentError>
Available on crate feature reflect only.
Expand description

A partial value over the named component’s Default, ready to be filled and handed to push.

A component with a Default keeps it in the fields a fill leaves alone, while one without has to name every field. Which of the two applies is read from the reflection, so a component that gains a Default starts merging over it without the submission changing.