use core::fmt::Debug;
use crate::error::Error;
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
pub trait Signature: AsRef<[u8]> + Debug + Sized {
fn from_bytes<B: AsRef<[u8]>>(bytes: B) -> Result<Self, Error>;
#[inline]
fn as_slice(&self) -> &[u8] {
self.as_ref()
}
#[cfg(feature = "alloc")]
#[inline]
fn into_vec(self) -> Vec<u8> {
self.as_slice().into()
}
}