[][src]Struct relm::ContainerComponent

pub struct ContainerComponent<WIDGET: Container + Widget> {
    pub container: WIDGET::Container,
    pub containers: WIDGET::Containers,
    // some fields omitted
}

Struct for relm containers to add GTK+ and relm Widgets.

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.

Methods

impl<WIDGET: Container + Widget> ContainerComponent<WIDGET>[src]

pub fn add<CHILDWIDGET: IsA<Widget>>(&self, widget: &CHILDWIDGET)[src]

Add a GTK+ widget to a relm container.

pub fn add_widget<CHILDWIDGET>(
    &self,
    model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET> where
    CHILDWIDGET: Widget + 'static,
    WIDGET::Container: ContainerExt + IsA<Widget> + IsA<Object>, 
[src]

Add a relm widget to a relm container.

pub fn emit(&self, msg: WIDGET::Msg)[src]

Emit a message of the widget stream.

pub fn stream(&self) -> &EventStream<WIDGET::Msg>[src]

Get the event stream of the component. This is used internally by the library.

pub fn widget(&self) -> &WIDGET::Root[src]

Get the widget of the component.

Trait Implementations

impl<WIDGET: Container + Widget> Clone for ContainerComponent<WIDGET>[src]

Auto Trait Implementations

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

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

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]