Function relm::init_test
[−]
[src]
pub fn init_test<WIDGET, MSG: Clone + DisplayVariant + Send + 'static>(
) -> Result<(Component<WIDGET::Model, MSG, WIDGET::Container>, WIDGET), ()> where
WIDGET: Widget<MSG> + Clone + 'static,
WIDGET::Model: Send,
Initialize a widget for a test.
It is to be used this way:
let (_component, widgets) = relm::init_test::<Win, Msg>().unwrap();
Warning
You should use _component
instead of _
to avoid dropping it too early, which will cause
events to not be sent.