Struct futures_glib::MainLoop
[−]
[src]
pub struct MainLoop { /* fields omitted */ }
Methods
impl MainLoop
[src]
pub fn new(cx: Option<&MainContext>) -> MainLoop
[src]
Creates a new event loop using the provided context.
If None
is provided then the default context will be used.
pub fn run(&self)
[src]
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.
pub fn quit(&self)
[src]
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.
pub fn is_running(&self) -> bool
[src]
Checks to see if the main loop is currently being run via
run
.
pub fn context(&self) -> MainContext
[src]
Returns the context of this loop.
Trait Implementations
impl Clone for MainLoop
[src]
fn clone(&self) -> MainLoop
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more