mod cell;
mod table;
pub use self::cell::{Align, CellFormat, CellFormatBuilder, Color, Justify};
pub use self::table::{
Border, BorderBuilder, HorizontalLine, Separator, SeparatorBuilder, TableFormat, VerticalLine,
};
pub const BORDER_COLUMN_ROW: TableFormat = TableFormat {
border: Border {
top: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
bottom: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
left: Some(VerticalLine { filler: '|' }),
right: Some(VerticalLine { filler: '|' }),
},
separator: Separator {
column: Some(VerticalLine { filler: '|' }),
row: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
title: None,
},
};
pub const BORDER_COLUMN_TITLE: TableFormat = TableFormat {
border: Border {
top: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
bottom: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
left: Some(VerticalLine { filler: '|' }),
right: Some(VerticalLine { filler: '|' }),
},
separator: Separator {
column: Some(VerticalLine { filler: '|' }),
row: None,
title: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
},
};
pub const BORDER_COLUMN_NO_ROW: TableFormat = TableFormat {
border: Border {
top: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
bottom: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
left: Some(VerticalLine { filler: '|' }),
right: Some(VerticalLine { filler: '|' }),
},
separator: Separator {
column: Some(VerticalLine { filler: '|' }),
row: None,
title: None,
},
};
pub const NO_BORDER_COLUMN_TITLE: TableFormat = TableFormat {
border: Border {
top: None,
bottom: None,
left: None,
right: None,
},
separator: Separator {
column: Some(VerticalLine { filler: '|' }),
row: None,
title: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
},
};
pub const NO_BORDER_COLUMN_ROW: TableFormat = TableFormat {
border: Border {
top: None,
bottom: None,
left: None,
right: None,
},
separator: Separator {
column: Some(VerticalLine { filler: '|' }),
row: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
title: None,
},
};
pub const BORDER_NO_COLUMN_ROW: TableFormat = TableFormat {
border: Border {
top: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
bottom: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
left: Some(VerticalLine { filler: '|' }),
right: Some(VerticalLine { filler: '|' }),
},
separator: Separator {
column: None,
row: Some(HorizontalLine {
left_end: '+',
right_end: '+',
junction: '+',
filler: '-',
}),
title: None,
},
};