pub trait InstantObject: Send + Sync {
type Output: Any + Send + Sync;
// Required method
fn create<'async_trait>( ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
where Self: 'async_trait;
// Provided method
fn destroy<'async_trait>(
_this: Arc<Self::Output>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait { ... }
}Required Associated Types§
Required Methods§
fn create<'async_trait>() -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>where
Self: 'async_trait,
Provided Methods§
fn destroy<'async_trait>(
_this: Arc<Self::Output>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".