pub struct Chart {
pub title: String,
pub unit: String,
pub better: Better,
pub subtitle: String,
pub date: String,
pub parties: Vec<Party>,
pub versus: usize,
pub groups: Vec<Group>,
pub notes: Vec<String>,
pub suffix: String,
pub decimals: Option<usize>,
pub words: Words,
}Fields§
§title: String§unit: String§better: Better§subtitle: String§date: String§parties: Vec<Party>§versus: usize§groups: Vec<Group>§notes: Vec<String>§suffix: String§decimals: Option<usize>§words: WordsImplementations§
Source§impl Chart
impl Chart
pub fn new(title: &str, unit: &str, better: Better, parties: &[&str]) -> Self
pub fn load(path: &Path) -> Result<Self>
pub fn parse(text: &str, format: Format) -> Result<Self>
pub fn rows(&self) -> impl Iterator<Item = &Row>
pub fn ratio(&self, row: &Row) -> Option<f64>
pub fn value_text(&self, row: &Row, party: usize) -> String
pub fn unit_line(&self) -> String
pub fn subtitle_line(&self) -> String
pub fn check(&self) -> Result<()>
Trait Implementations§
impl StructuralPartialEq for Chart
Auto Trait Implementations§
impl Freeze for Chart
impl RefUnwindSafe for Chart
impl Send for Chart
impl Sync for Chart
impl Unpin for Chart
impl UnsafeUnpin for Chart
impl UnwindSafe for Chart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more