pub struct Window<Message> { /* private fields */ }
Expand description
A weak reference to a running window.
Implementations§
source§impl<Message> Window<Message>
impl<Message> Window<Message>
sourcepub fn send(&self, message: Message) -> Result<(), Message>
pub fn send(&self, message: Message) -> Result<(), Message>
Sends a message to the window.
Returns Ok
if the message was successfully sent. The message may not
be received even if this function returns Ok
, if the window closes
between when the message was sent and when the message is received.
Errors
If the window is already closed, this function returns Err(message)
.
Trait Implementations§
Auto Trait Implementations§
impl<Message> RefUnwindSafe for Window<Message>
impl<Message> Send for Window<Message>where
Message: Send,
impl<Message> Sync for Window<Message>where
Message: Send,
impl<Message> Unpin for Window<Message>
impl<Message> UnwindSafe for Window<Message>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more