[][src]Trait khalas::render::Render

pub trait Render<PMsg: 'static> {
    type View: View<PMsg>;
    type Style;
    fn style(&self, theme: &impl Theme) -> Self::Style;
fn render_with_style(&self, _: &impl Theme, _: Self::Style) -> Self::View; fn render(&self, theme: &impl Theme) -> Self::View { ... } }

This is the main trait used to render elments

Associated Types

type View: View<PMsg>

the returne type from render function

type Style

Loading content...

Required methods

fn style(&self, theme: &impl Theme) -> Self::Style

Return style for the current state of the element

fn render_with_style(&self, _: &impl Theme, _: Self::Style) -> Self::View

This is the main function used to render element with the passed style

Loading content...

Provided methods

fn render(&self, theme: &impl Theme) -> Self::View

This is the function used to render element and returne Self::View

Arguments

Theme used to get the current style for the element

Loading content...

Implementations on Foreign Types

impl<PMsg: 'static> Render<PMsg> for Node<PMsg>[src]

type View = Node<PMsg>

type Style = ()

impl<PMsg: 'static> Render<PMsg> for Vec<Node<PMsg>>[src]

type View = Vec<Node<PMsg>>

type Style = ()

impl<PMsg: 'static> Render<PMsg> for El<PMsg>[src]

type View = El<PMsg>

type Style = ()

impl<PMsg: 'static> Render<PMsg> for Vec<El<PMsg>>[src]

type View = Vec<El<PMsg>>

type Style = ()

Loading content...

Implementors

impl<'a, PMsg: 'static, C, T> Render<PMsg> for Popover<'a, PMsg, C, T> where
    PMsg: 'static,
    C: Render<PMsg, View = Node<PMsg>>,
    T: Render<PMsg, View = Node<PMsg>>, 
[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for Icon<PMsg>[src]

type View = Node<PMsg>

type Style = ()

impl<PMsg: 'static> Render<PMsg> for Button<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for Checkbox<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for Entry<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for Radio<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for SpinEntry<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for Switch<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for HtmlIcon<PMsg>[src]

type View = Node<PMsg>

type Style = HtmlStyle

impl<PMsg: 'static> Render<PMsg> for SvgIcon<PMsg>[src]

type View = Node<PMsg>

type Style = SvgStyle

impl<PMsg: 'static> Render<PMsg> for UrlIcon<PMsg>[src]

type View = Node<PMsg>

type Style = UrlStyle

impl<PMsg: 'static> Render<PMsg> for Flexbox<PMsg>[src]

type View = Node<PMsg>

type Style = Style

impl<PMsg: 'static> Render<PMsg> for Item<PMsg>[src]

type View = Vec<Node<PMsg>>

type Style = Style

Loading content...