19 lines
365 B
Rust
19 lines
365 B
Rust
|
use std::sync::Arc;
|
||
|
use eyre::Result;
|
||
|
|
||
|
use async_trait::async_trait;
|
||
|
use tokio::sync::mpsc;
|
||
|
|
||
|
use crate::msg::RircdMsg;
|
||
|
use crate::event::RircdEvent;
|
||
|
|
||
|
|
||
|
#[async_trait]
|
||
|
pub trait Endpoint {
|
||
|
async fn listen(self: Arc<Self>, send_msg: mpsc::Sender<RircdMsg>,
|
||
|
send_event: mpsc::Sender<RircdEvent>) -> Result<()>;
|
||
|
fn name(&self) -> String;
|
||
|
}
|
||
|
|
||
|
|