use rusqlite::{types::FromSql, ToSql};
pub trait Format {
type In: ?Sized;
type Out;
type Buffer: ToSql + FromSql;
type SerializeError: std::error::Error;
type DeserializeError: std::error::Error;
fn sql_type() -> &'static str;
fn serialize(target: &Self::In) -> Result<Self::Buffer, Self::SerializeError>;
fn deserialize(data: &Self::Buffer) -> Result<Self::Out, Self::DeserializeError>;
}
mod raw;
pub use raw::Raw;
mod parse;
pub use parse::Parse;
#[cfg(feature = "cbor")]
mod cbor;
#[cfg(feature = "cbor")]
pub use cbor::Cbor;
#[cfg(feature = "json")]
mod json;
#[cfg(feature = "json")]
pub use json::Json;
#[cfg(feature = "postcard")]
mod postcard;
#[cfg(feature = "postcard")]
pub use self::postcard::Postcard;
#[cfg(feature = "msgpack")]
mod msgpack;
#[cfg(feature = "msgpack")]
pub use self::msgpack::Msgpack;