Struct spirit_tokio::installer::FutureInstaller [−][src]
pub struct FutureInstaller;
Expand description
An installer able to install (an uninstall) long-running futures.
This is an installer that can be used with Fragment
that produce futures.
- If the spirit does not contain a
Tokio
runtime yet, one (the default one) will be added as a singleton. Note that this has effect on how spirit manages lifetime of the application. - An uninstallation is performed by dropping canceling the future.
- This works with both concrete types (implementing
Future<Output = ()> + Send
) and boxed ones. Note that the boxed ones arePin<Box<dyn Future<Output = ()> + Send>>
, created byBox::pin
.
See the crate level examples for details how to use (the installer is used only as the associated type in the fragment implementation).
Trait Implementations
Returns the “default value” for a type. Read more
type UninstallHandle = RemoteDrop
type UninstallHandle = RemoteDrop
A handle representing lifetime of the resource. Read more
Installs another instance of the resource. Read more
Auto Trait Implementations
impl RefUnwindSafe for FutureInstaller
impl Send for FutureInstaller
impl Sync for FutureInstaller
impl Unpin for FutureInstaller
impl UnwindSafe for FutureInstaller
Blanket Implementations
Mutably borrows from an owned value. Read more