pub struct ThreadMessageLoop(/* private fields */);Expand description
Windows thread message loop context.
Implementations§
Source§impl ThreadMessageLoop
impl ThreadMessageLoop
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new thread message context.
§Panics
Will panic if a thread message context already exists for the current thread.
pub fn run(&mut self) -> Result<()>
Sourcepub fn run_with<E, F>(&mut self, loop_callback: F) -> Result<(), E>
pub fn run_with<E, F>(&mut self, loop_callback: F) -> Result<(), E>
Runs the Windows thread message loop.
The user defined callback will be called on every message except WM_QUIT.
Sourcepub fn post_quit_message()
pub fn post_quit_message()
Posts a ‘quit’ message in the thread message loop.
This will cause the running message loop to return.
pub fn post_thread_quit_message(thread_id: ThreadId) -> Result<()>
Available on crate feature
process only.Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThreadMessageLoop
impl RefUnwindSafe for ThreadMessageLoop
impl Send for ThreadMessageLoop
impl Sync for ThreadMessageLoop
impl Unpin for ThreadMessageLoop
impl UnwindSafe for ThreadMessageLoop
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