Skip to main content

IntoElement

Trait IntoElement 

Source
pub trait IntoElement<'a, M: Clone + Debug + 'static> {
    // Required method
    fn el(self) -> Element<'a, Message<M>>;
}
Expand description

Convert any truce-iced widget into an Element with .el().

Avoids the verbose Into::<Element<'a, Message<M>>>::into(...) pattern.

Row::new()
    .push(knob(P::Gain, params).label("Gain").el())
    .push(knob(P::Pan, params).label("Pan").el())

Required Methods§

Source

fn el(self) -> Element<'a, Message<M>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, M: Clone + Debug + 'static, T: Into<Element<'a, Message<M>>>> IntoElement<'a, M> for T