use std::time::Duration;
use crate::{
live::{BotError, Instrument},
prelude::BuildError,
types::{LiveEvent, LiveRequest},
};
mod config;
pub mod iceoryx;
pub const TO_ALL: u64 = 0;
pub trait Channel {
fn build<MD>(instruments: &[Instrument<MD>]) -> Result<Self, BuildError>
where
Self: Sized;
fn recv_timeout(&mut self, id: u64, timeout: Duration) -> Result<(usize, LiveEvent), BotError>;
fn send(&mut self, id: u64, inst_no: usize, request: LiveRequest) -> Result<(), BotError>;
}