[−][src]Struct druid::ExtEventSink
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.
Methods
impl ExtEventSink
[src]
pub fn submit_command<T: Any + Send>(
&self,
sel: Selector,
obj: impl Into<Option<T>>,
target: impl Into<Option<Target>>
) -> Result<(), ExtEventError>
[src]
&self,
sel: Selector,
obj: impl Into<Option<T>>,
target: impl Into<Option<Target>>
) -> Result<(), ExtEventError>
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 (optional) argument
separately, and it will be turned into a Command
when it is received.
The obj
argument can be any type which implements Any + Send
, or None
if this command has no argument.
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]
fn clone(&self) -> ExtEventSink
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for ExtEventSink
impl Send for ExtEventSink
impl Sync for ExtEventSink
impl Unpin for ExtEventSink
impl UnwindSafe for ExtEventSink
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> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
fn round_into(self) -> U
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>,