[−][src]Struct relm::Component
Widget that was added by the ContainerWidget::add_widget()
method.
Warning
You must keep your components as long as you want them to send/receive events.
Common practice is to store Component
s in the Widget
struct (see the communication
example).
The #[widget]
attribute takes care of storing them in the struct automatically (see the
communication-attribute example).
Implementations
impl<WIDGET: Widget> Component<WIDGET>
[src]
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: Widget> Clone for Component<WIDGET>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<WIDGET: Widget> Drop for Component<WIDGET>
[src]
Auto Trait Implementations
impl<WIDGET> RefUnwindSafe for Component<WIDGET> where
<WIDGET as Update>::Msg: RefUnwindSafe,
<WIDGET as Widget>::Root: RefUnwindSafe,
<WIDGET as Update>::Msg: RefUnwindSafe,
<WIDGET as Widget>::Root: RefUnwindSafe,
impl<WIDGET> !Send for Component<WIDGET>
impl<WIDGET> !Sync for Component<WIDGET>
impl<WIDGET> Unpin for Component<WIDGET> where
<WIDGET as Widget>::Root: Unpin,
<WIDGET as Widget>::Root: Unpin,
impl<WIDGET> UnwindSafe for Component<WIDGET> where
<WIDGET as Update>::Msg: RefUnwindSafe,
<WIDGET as Widget>::Root: UnwindSafe,
<WIDGET as Update>::Msg: RefUnwindSafe,
<WIDGET as Widget>::Root: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,