Struct futures_glib::MainLoop
[−]
[src]
pub struct MainLoop { /* fields omitted */ }
Methods
impl MainLoop
[src]
fn new(cx: Option<&MainContext>) -> MainLoop
Creates a new event loop using the provided context.
If None
is provided then the default context will be used.
fn run(&self)
Runs a main loop until quit
is called on the loop.
If this is called for the thread of the loop's MainContext
, it will
process events from the loop, otherwise it will simply wait.
fn quit(&self)
Stops a MainLoop
from running. Any calls to run
for the
loop will return.
Note that sources that have already been dispatched when
quit
is called will still be executed.
fn is_running(&self) -> bool
Checks to see if the main loop is currently being run via
run
.
fn context(&self) -> MainContext
Returns the context of this loop.
Trait Implementations
impl Clone for MainLoop
[src]
fn clone(&self) -> MainLoop
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more