pub trait Representable {
type Intermediate;
// Required methods
fn as_intermediate(&self) -> Self::Intermediate;
fn update_from_intermediate(&mut self, repr: &Self::Intermediate);
}Expand description
A trait that specifies a struct can both:
- Generate an intermediate representation
- Update self from an intermediate representation