FutureSendStatic

Trait FutureSendStatic 

Source
pub trait FutureSendStatic<T>:
    Future<Output = T>
    + Send
    + 'static { }
Expand description

A trait for futures that are sendable and have a static lifetime.

This marker trait simplifies generic bounds for asynchronous operations, ensuring that futures can be safely managed by the async runtime without lifetime issues.

Implementors§

Source§

impl<T, R> FutureSendStatic<R> for T
where T: Future<Output = R> + Send + 'static,

A blanket implementation for any future that is sendable and has a static lifetime.

This is a convenient trait for working with futures in an asynchronous context, ensuring that they can be safely managed by the async runtime across different threads.