Struct glib::SourceFuture[][src]

pub struct SourceFuture<F, T> { /* fields omitted */ }

Represents a Future around a glib::Source. The future will be resolved once the source has provided a value

Methods

impl<F, T: 'static> SourceFuture<F, T> where
    F: FnOnce(Sender<T>) -> Source + Send + 'static, 
[src]

Create a new SourceFuture

The provided closure should return a newly created glib::Source when called and pass the value provided by the source to the oneshot sender that is passed to the closure.

Trait Implementations

impl<F, T> Future for SourceFuture<F, T> where
    F: FnOnce(Sender<T>) -> Source + Send + 'static, 
[src]

A successful value

An error

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

impl<T, F> Drop for SourceFuture<T, F>
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<F, T> Send for SourceFuture<F, T> where
    F: Send,
    T: Send

impl<F, T> Sync for SourceFuture<F, T> where
    F: Sync,
    T: Send