use lapin::message::Delivery; use tokio::sync::mpsc::Receiver; use proto::touchpad::common::v1; use crate::TouchpadLiveClient; #[async_trait::async_trait] pub trait Output { async fn add_swimmer(&self, swimmer: &v1::Swimmer) -> Result<(), Box>; async fn add_team(&self, team: &v1::Team) -> Result<(), Box>; async fn add_meet(&self, meet: &v1::SwimMeet) -> Result<(), Box>; async fn upsert_event(&self, event: &v1::Event) -> Result<(), Box>; } pub struct Hub<'a> { source: TouchpadLiveClient<'a>, outputs: Vec>, messages: Receiver, }