pub trait Encode<T>: TryEncode<T> {
// Provided method
fn encode<D: CANWrite>(&self, data: &mut D, value: T) { ... }
}Expand description
A trait modeling the not failable encoding of data.
Encode is sub-trait of TryEncode. encode is implemented using try_encode. If try_encode succeeds, encode returns. Otherwise, encode panics.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.