pub trait Encode: Debug {
type Error: From<Error> + Debug;
// Required methods
fn encode_len(&self) -> Result<usize, Self::Error>;
fn encode(&self, buff: &mut [u8]) -> Result<usize, Self::Error>;
}Expand description
Encode trait implemented for binary encodable objects
Required Associated Types§
Required Methods§
Sourcefn encode_len(&self) -> Result<usize, Self::Error>
fn encode_len(&self) -> Result<usize, Self::Error>
Calculate expected encoded length for an object
Implementations on Foreign Types§
Implementors§
Source§impl Encode for GenericApdu
Available on crate feature alloc only.Encode implementation for GenericApdu
impl Encode for GenericApdu
Available on crate feature
alloc only.Encode implementation for GenericApdu