use crate::db::codec::{ByteDecodeError, writer::ByteEncodeError};
#[derive(Clone, Debug, Eq, PartialEq)]
pub(in crate::db) enum TokenWireError {
Encode,
Decode,
}
impl TokenWireError {
pub(in crate::db::cursor::token) const fn encode() -> Self {
Self::Encode
}
pub(in crate::db::cursor::token) const fn decode() -> Self {
Self::Decode
}
}
impl From<ByteDecodeError> for TokenWireError {
fn from(_: ByteDecodeError) -> Self {
Self::Decode
}
}
impl From<ByteEncodeError> for TokenWireError {
fn from(_: ByteEncodeError) -> Self {
Self::Encode
}
}