mod decode;
mod encode;
#[cfg(feature = "prost")]
mod prost;
#[cfg(test)]
mod tests;
pub use self::decode::Streaming;
pub(crate) use self::encode::{encode_client, encode_server};
#[cfg(feature = "prost")]
#[cfg_attr(docsrs, doc(cfg(feature = "prost")))]
pub use self::prost::ProstCodec;
pub use tokio_util::codec::{Decoder, Encoder};
use crate::Status;
pub trait Codec: Default {
type Encode: Send + 'static;
type Decode: Send + 'static;
type Encoder: Encoder<Item = Self::Encode, Error = Status> + Send + Sync + 'static;
type Decoder: Decoder<Item = Self::Decode, Error = Status> + Send + Sync + 'static;
fn encoder(&mut self) -> Self::Encoder;
fn decoder(&mut self) -> Self::Decoder;
}