pub trait DataSourceLifeCycle:
Clone
+ Send
+ Sync
+ Sized
+ 'static {
type Storage: Send + Sync;
// Required methods
fn create<'async_trait>(
node_id: usize,
) -> Pin<Box<dyn Future<Output = Self::Storage> + Send + 'async_trait>>
where Self: 'async_trait;
fn connect<'life0, 'async_trait>(
storage: &'life0 Self::Storage,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reset<'life0, 'async_trait>(
storage: &'life0 Self::Storage,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 Event<MockTypes>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn leaf_only_ds<'life0, 'async_trait>(
_storage: &'life0 Self::Storage,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn setup<'life0, 'async_trait, V>(
_network: &'life0 mut MockNetwork<Self, V>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where V: 'async_trait + Versions,
Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Associated Types§
Required Methods§
fn create<'async_trait>(
node_id: usize,
) -> Pin<Box<dyn Future<Output = Self::Storage> + Send + 'async_trait>>where
Self: 'async_trait,
fn connect<'life0, 'async_trait>(
storage: &'life0 Self::Storage,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reset<'life0, 'async_trait>(
storage: &'life0 Self::Storage,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 Event<MockTypes>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn leaf_only_ds<'life0, 'async_trait>(
_storage: &'life0 Self::Storage,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.