pub struct DBusCallQueue { /* private fields */ }Expand description
A queue of asynchronous calls of which one is in flight at a time.
Implementations§
Source§impl DBusCallQueue
impl DBusCallQueue
Sourcepub fn new(
error_handler: impl Fn(DBusCallError) -> LocalBoxFuture<()> + 'static,
) -> Self
pub fn new( error_handler: impl Fn(DBusCallError) -> LocalBoxFuture<()> + 'static, ) -> Self
error_handler is awaited with the failure of a call nobody waits
for (one queued with enqueue).
pub fn enqueue<F>(&self, cb: impl FnOnce() -> F + 'static)where
F: Future<Output = DBusResult> + 'static,
Sourcepub fn enqueue_async<F>(
&self,
cb: impl FnOnce() -> F + 'static,
) -> impl Future<Output = DBusResult> + 'staticwhere
F: Future<Output = DBusResult> + 'static,
pub fn enqueue_async<F>(
&self,
cb: impl FnOnce() -> F + 'static,
) -> impl Future<Output = DBusResult> + 'staticwhere
F: Future<Output = DBusResult> + 'static,
Queues a call and gives the future of its completion
(EnqueueAsync).
Sourcepub fn enqueue_async_with_result<T, F>(
&self,
cb: impl FnOnce() -> F + 'static,
) -> impl Future<Output = DBusResult<T>> + 'staticwhere
T: 'static,
F: Future<Output = DBusResult<T>> + 'static,
pub fn enqueue_async_with_result<T, F>(
&self,
cb: impl FnOnce() -> F + 'static,
) -> impl Future<Output = DBusResult<T>> + 'staticwhere
T: 'static,
F: Future<Output = DBusResult<T>> + 'static,
Queues a call with a result and gives the future of the result
(EnqueueAsync<T>).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DBusCallQueue
impl !Send for DBusCallQueue
impl !Sync for DBusCallQueue
impl !UnwindSafe for DBusCallQueue
impl Freeze for DBusCallQueue
impl Unpin for DBusCallQueue
impl UnsafeUnpin for DBusCallQueue
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more