pub trait Encode<T> {
// Required method
fn encode(&self) -> Vec<T>;
// Provided methods
fn len(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
}Expand description
Trait for things that can be converted to sequences (of bytes, words, etc)