Trait Streamable
Source pub trait Streamable {
// Required methods
fn update_digest(&self, digest: &mut Sha256);
fn stream(&self, out: &mut Vec<u8>) -> Result<()>;
fn parse<const TRUSTED: bool>(input: &mut Cursor<&[u8]>) -> Result<Self>
where Self: Sized;
// Provided methods
fn to_bytes(&self) -> Result<Vec<u8>> { ... }
fn from_bytes(bytes: &[u8]) -> Result<Self>
where Self: Sized { ... }
fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self>
where Self: Sized { ... }
fn hash(&self) -> [u8; 32] { ... }
}