use anyhow::Result;
use std::{future::Future, pin::Pin, sync::Arc};
use tokio::task::JoinHandle;
pub mod twins;
pub type JoinHandleVec = Vec<JoinHandle<()>>;
pub trait ConnectionImplementation: Send + Sync {
fn connect(&mut self) -> Pin<Box<dyn Future<Output = Result<JoinHandleVec>> + Send>>;
fn error(&mut self) -> Option<Arc<dyn std::error::Error>>;
}