use std::future::Future; use tokio::io::AsyncWrite; use lavina_core::player::PlayerConnection; use lavina_core::prelude::Str; pub struct IrcConnection<'a, T: AsyncWrite + Unpin> { pub server_name: Str, /// client is nick of requester pub client: Str, pub writer: &'a mut T, pub player_connection: &'a mut PlayerConnection, } pub trait Handler where T: AsyncWrite + Unpin, { fn handle(&self, arg: IrcConnection) -> impl Future>; }