pub trait Encode<'en, Context = ()> {
// Required method
fn encode_with(&self, buf: &mut Vec<u8>, context: Context);
// Provided method
fn encode(&self, buf: &mut Vec<u8>)
where Self: Encode<'en, ()> { ... }
}
pub trait Encode<'en, Context = ()> {
// Required method
fn encode_with(&self, buf: &mut Vec<u8>, context: Context);
// Provided method
fn encode(&self, buf: &mut Vec<u8>)
where Self: Encode<'en, ()> { ... }
}