1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#[derive(Debug)]
pub struct LineLayout {
rows: Vec<RowLayout>,
}
impl LineLayout {
pub fn new(rows: Vec<RowLayout>) -> Self {
Self { rows }
}
pub fn rows(&self) -> &Vec<RowLayout> {
&self.rows
}
}
#[derive(Debug)]
pub struct RowLayout {
widths: Vec<usize>,
}
impl RowLayout {
pub fn new(widths: Vec<usize>) -> Self {
Self { widths }
}
pub fn widths(&self) -> &Vec<usize> {
&self.widths
}
}