pub struct SheetTable { /* private fields */ }Expand description
Which build sheets each material may be printed on, keyed by material.
Materials and sheets are matched trimmed and without regard to case, as a spool’s own material is written by whoever registered it. A table is never empty in either direction: every material lists at least one sheet and nothing is blank.
Implementations§
Source§impl SheetTable
impl SheetTable
Sourcepub fn new(entries: BTreeMap<String, Vec<String>>) -> Result<Self, String>
pub fn new(entries: BTreeMap<String, Vec<String>>) -> Result<Self, String>
A table of these entries.
§Errors
Returns why the entries are no table: a blank material or sheet, a material listing no sheet, or two materials that differ only in case or surrounding space.
Sourcepub fn allowed_for(&self, material: &MaterialName) -> Option<&[SheetId]>
pub fn allowed_for(&self, material: &MaterialName) -> Option<&[SheetId]>
The sheets the table allows a material on, when it lists the material.
Trait Implementations§
Source§impl Clone for SheetTable
impl Clone for SheetTable
Source§impl Debug for SheetTable
impl Debug for SheetTable
Source§impl Default for SheetTable
impl Default for SheetTable
impl Eq for SheetTable
Source§impl PartialEq for SheetTable
impl PartialEq for SheetTable
impl StructuralPartialEq for SheetTable
Auto Trait Implementations§
impl Forget for SheetTable
impl Freeze for SheetTable
impl RefUnwindSafe for SheetTable
impl Send for SheetTable
impl Sync for SheetTable
impl Unpin for SheetTable
impl UnsafeUnpin for SheetTable
impl UnwindSafe for SheetTable
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