[−][src]Struct vgtk::Scope
A channel for sending messages to a Component
.
Implementations
impl<C: 'static + Component> Scope<C>
[src]
pub fn try_send(
&self,
message: C::Message
) -> Result<(), TrySendError<C::Message>>
[src]
&self,
message: C::Message
) -> Result<(), TrySendError<C::Message>>
Attempt to send a message to the component this Scope
belongs to.
This should always succeed if the component is running.
If you receive an error, this generally means the component has unmounted and the scope has become invalid.
If the message is sent successfully, it will show up at your
component's Component::update()
method presently.
Never call this from inside a signal handler. It's important that you follow the usual pattern of returning messages from signal handler closures, or you risk unexpected side effects and potential infinite loops.
pub fn name(&self) -> &'static str
[src]
Get the name of the component this Scope
belongs to.
Trait Implementations
impl<C: Component> Clone for Scope<C>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Component> Debug for Scope<C>
[src]
impl<C: Component> Eq for Scope<C>
[src]
impl<C: Component> Hash for Scope<C>
[src]
fn hash<H: Hasher>(&self, h: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<C: Component> PartialEq<Scope<C>> for Scope<C>
[src]
Auto Trait Implementations
impl<C> !RefUnwindSafe for Scope<C>
impl<C> Send for Scope<C> where
<C as Component>::Message: Send,
<C as Component>::Message: Send,
impl<C> Sync for Scope<C> where
<C as Component>::Message: Send,
<C as Component>::Message: Send,
impl<C> Unpin for Scope<C>
impl<C> !UnwindSafe for Scope<C>
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>,