use async_trait::async_trait;
use futures_util::stream::BoxStream;
use crate::{channel::types::ChannelEvent, error::ChannelError};
#[async_trait]
pub trait Channel: Send + Sync {
async fn send(&self, event: ChannelEvent) -> Result<(), ChannelError>;
fn stream(
&self,
) -> Result<BoxStream<'static, Result<ChannelEvent, ChannelError>>, ChannelError>;
}