Function relm::init_test [] [src]

pub fn init_test<WIDGET>(
) -> Result<(Component<WIDGET::Model, WIDGET::Msg, WIDGET::Container>, WIDGET), ()> where
    WIDGET: Widget + Clone + 'static,
    WIDGET::Model: Send,
    WIDGET::Msg: Clone + DisplayVariant + Send + 'static, 

Initialize a widget for a test.

It is to be used this way:

let (_component, widgets) = relm::init_test::<Win>().unwrap();

Warning

You should use _component instead of _ to avoid dropping it too early, which will cause events to not be sent.