pub enum PreviewVariant {
Knobs {
name: &'static str,
overrides: KnobOverrides,
},
Scenario {
name: &'static str,
builder: ScenarioBuilder,
},
}Variants§
Knobs
Knob preset — WidgetCatalog::build runs and consults
knobs() to build the widget; the supplied overrides are
applied on top of the spec’s defaults.
Scenario
Hand-authored scenario — WidgetCatalog::build ignores its
KnobValues argument when this variant is selected and instead
dispatches to the captured builder fn.
Implementations§
Trait Implementations§
Source§impl Clone for PreviewVariant
impl Clone for PreviewVariant
Source§fn clone(&self) -> PreviewVariant
fn clone(&self) -> PreviewVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PreviewVariant
impl RefUnwindSafe for PreviewVariant
impl Send for PreviewVariant
impl Sync for PreviewVariant
impl Unpin for PreviewVariant
impl UnsafeUnpin for PreviewVariant
impl UnwindSafe for PreviewVariant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more