pub trait ToTldr<T = String> {
type Error;
// Required method
fn to_tldr(&self) -> Box<dyn Tldr<T, Error = Self::Error>>;
}
Expand description
A trait for converting objects into TL;DR summaries.
§Examples
struct Rectangle {
width: u32,
height: u32,
}
impl ToTldr<String> for Rectangle {
type Error = Box<dyn core::error::Error>;
fn to_tldr(&self) -> Box<dyn Tldr<String, Error = Self::Error>> {
todo!() // FIXME
}
}