[−][src]Struct glib::SourceFuture
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 + 'static,
[src][−]
F: FnOnce(Sender<T>) -> Source + 'static,
pub fn new(create_source: F) -> SourceFuture<F, T>
[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<T, F> Drop for SourceFuture<T, F>
[src][+]
impl<F, T> Future for SourceFuture<F, T> where
F: FnOnce(Sender<T>) -> Source + 'static,
[src][+]
F: FnOnce(Sender<T>) -> Source + 'static,
impl<F, T> Unpin for SourceFuture<F, T>
[src]
Auto Trait Implementations
impl<F, T> !RefUnwindSafe for SourceFuture<F, T>
impl<F, T> Send for SourceFuture<F, T> where
F: Send,
T: Send,
F: Send,
T: Send,
impl<F, T> Sync for SourceFuture<F, T> where
F: Sync,
T: Send,
F: Sync,
T: Send,
impl<F, T> !UnwindSafe for SourceFuture<F, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> FutureExt for T where
T: Future + ?Sized,
[src][+]
T: Future + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<F, T, E> TryFuture for F where
F: Future<Output = Result<T, E>> + ?Sized,
[src][+]
F: Future<Output = Result<T, E>> + ?Sized,
impl<Fut> TryFutureExt for Fut where
Fut: TryFuture + ?Sized,
[src][+]
Fut: TryFuture + ?Sized,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,