Skip to main content

Decodable

Trait Decodable 

Source
pub trait Decodable<'tx> {
    // Required method
    fn decode(data_val: &[u8]) -> Result<Self, Error>
       where Self: Sized;
}
Expand description

Implement this to be able to decode data values

Required Methods§

Source

fn decode(data_val: &[u8]) -> Result<Self, Error>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl Decodable<'_> for ()

Source§

fn decode(_: &[u8]) -> Result<Self, Error>

Source§

impl Decodable<'_> for Vec<u8>

Source§

fn decode(data_val: &[u8]) -> Result<Self, Error>
where Self: Sized,

Source§

impl<'tx> Decodable<'tx> for Cow<'tx, [u8]>

Source§

fn decode(_: &[u8]) -> Result<Self, Error>

Source§

impl<'tx> Decodable<'tx> for Bytes<'tx>

Available on crate feature lifetimed-bytes only.
Source§

fn decode(_: &[u8]) -> Result<Self, Error>

Source§

impl<const LEN: usize> Decodable<'_> for [u8; LEN]

Source§

fn decode(data_val: &[u8]) -> Result<Self, Error>
where Self: Sized,

Implementors§