Trait ComponentWrap

Source
pub trait ComponentWrap<T: ?Sized>: StateMachineChild + DynClone {
    // Required method
    fn layout(
        &self,
        state: &mut StateManager,
        driver: &Driver,
        window: &Arc<SourceID>,
    ) -> Box<dyn Layout<T> + 'static>;
}

Required Methods§

Source

fn layout( &self, state: &mut StateManager, driver: &Driver, window: &Arc<SourceID>, ) -> Box<dyn Layout<T> + 'static>

Trait Implementations§

Source§

impl<T: Component + 'static, U> From<Box<T>> for Box<dyn ComponentWrap<U>>
where for<'a> &'a U: From<&'a <T as Component>::Props>, <T as Component>::Props: Sized,

Source§

fn from(value: Box<T>) -> Self

Converts to this type from the input type.

Implementations on Foreign Types§

Source§

impl<U: ?Sized> ComponentWrap<U> for Box<dyn Component<Props = PropBag>>
where for<'a> &'a U: From<&'a PropBag>,

Source§

fn layout( &self, manager: &mut StateManager, driver: &Driver, window: &Arc<SourceID>, ) -> Box<dyn Layout<U> + 'static>

Implementors§

Source§

impl<U: ?Sized, C: Component> ComponentWrap<U> for C
where for<'a> &'a U: From<&'a <C as Component>::Props>, <C as Component>::Props: Sized,