Function relm::init_test [] [src]

pub fn init_test<WIDGET>() -> Result<Component<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 = 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.