#[cfg(not(feature = "std"))]
use alloc::borrow::Cow;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
#[cfg(not(feature = "std"))]
use alloc::boxed::Box;
use crate::error::Error;
pub trait FromBytes: Len {
type E: Error;
fn from_bytes(bytes: &[u8]) -> Result<Self, Self::E>
where
Self: Sized;
}
pub trait ToVec: Len {
fn to_vec(&self) -> Vec<u8>
where
Self: Sized;
}
pub trait Len {
const LEN: usize;
}