[][src]Struct seed_style_preview::Composition

pub struct Composition<A, Mdl, Ms, T> where
    T: BreakpointTheme,
    A: LayoutArea
{ pub container_styles: Vec<Style>, pub layouts: Vec<Layout<A>>, pub mocked_children: Option<(String, u32, CssWidth, CssHeight)>, pub children: Vec<Box<dyn Fn(&Mdl) -> Node<Ms> + 'static>>, pub default_idx: Option<usize>, pub areas_hm: HashMap<A, Box<dyn Fn(&Mdl) -> Node<Ms> + 'static>>, pub layouts_hm: HashMap<T, usize>, }

Fields

container_styles: Vec<Style>layouts: Vec<Layout<A>>mocked_children: Option<(String, u32, CssWidth, CssHeight)>children: Vec<Box<dyn Fn(&Mdl) -> Node<Ms> + 'static>>default_idx: Option<usize>areas_hm: HashMap<A, Box<dyn Fn(&Mdl) -> Node<Ms> + 'static>>layouts_hm: HashMap<T, usize>

Implementations

impl<A, Mdl, Ms, T> Composition<A, Mdl, Ms, T> where
    T: BreakpointTheme + 'static,
    Ms: 'static,
    Mdl: 'static,
    A: LayoutArea
[src]

pub fn with_layouts(bp_layouts: &[(T, Layout<A>)]) -> Self[src]

pub fn add(&mut self, bp: T, layout: Layout<A>) -> &mut Self[src]

pub fn set_default(&mut self, layout: Layout<A>) -> &mut Self[src]

pub fn mock_children<W, H>(
    &mut self,
    name: &str,
    count: u32,
    width: W,
    height: H
) -> &mut Self where
    W: Into<CssWidth>,
    H: Into<CssHeight>, 
[src]

pub fn render(&self, model: &Mdl) -> Node<Ms>[src]

pub fn set_content<F: Fn(&Mdl) -> Node<Ms> + 'static>(
    &mut self,
    area: A,
    area_view: F
) -> &mut Self
[src]

pub fn add_child<F: Fn(&Mdl) -> Node<Ms> + 'static>(
    &mut self,
    child_view: F
) -> &mut Self
[src]

pub fn add_style(&mut self, style: Style) -> &mut Self[src]

pub fn add_styles(&mut self, styles: &[Style]) -> &mut Self[src]

pub fn render_layout(&self, idx: usize, model: &Mdl) -> Node<Ms>[src]

pub fn render_grid(&self, idx: usize, model: &Mdl) -> Node<Ms>[src]

pub fn render_areas(&self, idx: usize, model: &Mdl) -> Node<Ms>[src]

pub fn mock(&self, area: A, gtc: &str, gtr: &str) -> Node<Ms>[src]

pub fn mocked_child<W, H>(
    &self,
    name: &str,
    count: u32,
    width: W,
    height: H
) -> Vec<Node<Ms>> where
    W: Into<CssWidth>,
    H: Into<CssHeight>, 
[src]

Trait Implementations

impl<A, Mdl, Ms, T> Default for Composition<A, Mdl, Ms, T> where
    T: BreakpointTheme,
    A: LayoutArea
[src]

impl<A, Mdl, Ms> WithLayoutComposition<A, Mdl, Ms> for Composition<A, Mdl, Ms, SeedBreakpoint> where
    Ms: 'static,
    Mdl: 'static,
    A: LayoutArea
[src]

Auto Trait Implementations

impl<A, Mdl, Ms, T> !RefUnwindSafe for Composition<A, Mdl, Ms, T>

impl<A, Mdl, Ms, T> !Send for Composition<A, Mdl, Ms, T>

impl<A, Mdl, Ms, T> !Sync for Composition<A, Mdl, Ms, T>

impl<A, Mdl, Ms, T> Unpin for Composition<A, Mdl, Ms, T> where
    A: Unpin,
    T: Unpin

impl<A, Mdl, Ms, T> !UnwindSafe for Composition<A, Mdl, Ms, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,