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 SheetTablewhere
*const LeafNode<MaterialName, Vec<SheetId>> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(MaterialName, Vec<SheetId>)>>: Freeze,
impl Move for SheetTable
impl RefUnwindSafe for SheetTable
impl Send for SheetTablewhere
NodeRef<Owned, MaterialName, Vec<SheetId>, LeafOrInternal>: Send,
BoxRaw<(MaterialName, Vec<SheetId>)>: Send,
impl Sync for SheetTablewhere
NodeRef<Owned, MaterialName, Vec<SheetId>, LeafOrInternal>: Sync,
BoxRaw<(MaterialName, Vec<SheetId>)>: Sync,
impl Unpin for SheetTablewhere
*const LeafNode<MaterialName, Vec<SheetId>> is !null: Unpin,
Box<(MaterialName, Vec<SheetId>)>: Unpin,
impl UnsafeUnpin for SheetTablewhere
*const LeafNode<MaterialName, Vec<SheetId>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(MaterialName, Vec<SheetId>)>>: UnsafeUnpin,
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