1 2 3 4 5 6 7 8 9 10 11 12 13
pub enum Filler { FillerStart(Box<Filler>), FillerEnd, } impl Filler { pub fn length(&self) -> usize { match self { Filler::FillerStart(f) => f.length() + 1, Filler::FillerEnd => 1, } } }