#[derive(Debug, Clone, Default)]
pub struct CompositeGraphicUnits {
pub items: Vec<String>,
}
impl CompositeGraphicUnits {
#[must_use]
pub fn new() -> Self {
Self::default()
}
pub fn add(&mut self, item: impl Into<String>) {
self.items.push(item.into());
}
#[must_use]
pub fn len(&self) -> usize {
self.items.len()
}
#[must_use]
pub fn is_empty(&self) -> bool {
self.items.is_empty()
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn composite_graphic_units_new() {
let cgu = CompositeGraphicUnits::new();
assert!(cgu.is_empty());
}
}