cosmic::iced::daemon

Trait View

source
pub trait View<'a, State, Message, Theme, Renderer> {
    // Required method
    fn view(
        &self,
        state: &'a State,
        window: Id,
    ) -> impl Into<Element<'a, Message, Theme, Renderer>>;
}
Expand description

The view logic of some Daemon.

This trait allows the daemon builder to take any closure that returns any Into<Element<'_, Message>>.

Required Methods§

source

fn view( &self, state: &'a State, window: Id, ) -> impl Into<Element<'a, Message, Theme, Renderer>>

Produces the widget of the Daemon.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T, State, Message, Theme, Renderer, Widget> View<'a, State, Message, Theme, Renderer> for T
where T: Fn(&'a State, Id) -> Widget, State: 'static, Widget: Into<Element<'a, Message, Theme, Renderer>>,