Struct relm::ContainerComponent
source · pub struct ContainerComponent<WIDGET: Container + Widget> {
pub container: WIDGET::Container,
pub containers: WIDGET::Containers,
/* private fields */
}
Expand description
Struct for relm containers to add GTK+ and relm Widget
s.
Fields
container: WIDGET::Container
The default container of this component.
containers: WIDGET::Containers
Additional containers used for multi-containers. This can be () if not needed.
Implementations
sourceimpl<WIDGET: Container + Widget> ContainerComponent<WIDGET>
impl<WIDGET: Container + Widget> ContainerComponent<WIDGET>
sourcepub fn add<CHILDWIDGET: IsA<Widget>>(&self, widget: &CHILDWIDGET)
pub fn add<CHILDWIDGET: IsA<Widget>>(&self, widget: &CHILDWIDGET)
Add a GTK+ widget to a relm container.
sourcepub fn add_widget<CHILDWIDGET>(
&self,
model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET>where
CHILDWIDGET: Widget + 'static,
WIDGET::Container: ContainerExt + IsA<Widget> + IsA<Object>,
pub fn add_widget<CHILDWIDGET>(
&self,
model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET>where
CHILDWIDGET: Widget + 'static,
WIDGET::Container: ContainerExt + IsA<Widget> + IsA<Object>,
Add a relm widget to a relm container.
sourcepub fn owned_stream(&self) -> &EventStream<WIDGET::Msg>
pub fn owned_stream(&self) -> &EventStream<WIDGET::Msg>
Get the event stream of the component. This is used internally by the library.
sourcepub fn stream(&self) -> StreamHandle<WIDGET::Msg>
pub fn stream(&self) -> StreamHandle<WIDGET::Msg>
Get the event stream of the component. This is used internally by the library.
Auto Trait Implementations
impl<WIDGET> RefUnwindSafe for ContainerComponent<WIDGET>where
<WIDGET as Container>::Container: RefUnwindSafe,
<WIDGET as Container>::Containers: RefUnwindSafe,
<WIDGET as Update>::Msg: RefUnwindSafe,
<WIDGET as Widget>::Root: RefUnwindSafe,
impl<WIDGET> !Send for ContainerComponent<WIDGET>
impl<WIDGET> !Sync for ContainerComponent<WIDGET>
impl<WIDGET> Unpin for ContainerComponent<WIDGET>where
<WIDGET as Container>::Container: Unpin,
<WIDGET as Container>::Containers: Unpin,
<WIDGET as Widget>::Root: Unpin,
impl<WIDGET> UnwindSafe for ContainerComponent<WIDGET>where
<WIDGET as Container>::Container: UnwindSafe,
<WIDGET as Container>::Containers: UnwindSafe,
<WIDGET as Update>::Msg: RefUnwindSafe,
<WIDGET as Widget>::Root: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more