[][src]Struct druid::ExtEventSink

pub struct ExtEventSink { /* fields omitted */ }

A thing that can move into other threads and be used to submit commands back to the running application.

This API is preliminary, and may be changed or removed without warning.

Implementations

impl ExtEventSink[src]

pub fn submit_command<T: Any + Send + Sync>(
    &self,
    selector: Selector<T>,
    payload: impl Into<Box<T>>,
    target: impl Into<Option<Target>>
) -> Result<(), ExtEventError>
[src]

Submit a Command to the running application.

Command is not thread safe, so you cannot submit it directly; instead you have to pass the Selector and the payload separately, and it will be turned into a Command when it is received.

The payload must implement Any + Send + Sync.

If no explicit Target is submitted, the Command will be sent to the application's first window; if that window is subsequently closed, then the command will be sent to an arbitrary other window.

This limitation may be removed in the future.

Trait Implementations

impl Clone for ExtEventSink[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

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.