pub struct LayerMap {
pub copper_stack: Vec<String>,
pub kicad_to_fab: HashMap<String, String>,
pub fab_to_kicad: HashMap<String, String>,
}Expand description
Ordered copper stack + O(1) KiCad-name -> canonical FabLayerKey table.
Fields§
§copper_stack: Vec<String>§kicad_to_fab: HashMap<String, String>§fab_to_kicad: HashMap<String, String>Implementations§
Source§impl LayerMap
impl LayerMap
Sourcepub fn from_pcb_layers(layers: &[PcbLayer]) -> Self
pub fn from_pcb_layers(layers: &[PcbLayer]) -> Self
Build a layer map from a board’s (layers ...) declarations.
Sourcepub fn fab_key(&self, kicad_layer: &str) -> Option<&str>
pub fn fab_key(&self, kicad_layer: &str) -> Option<&str>
Look up the canonical FabLayerKey for a KiCad layer token.
Sourcepub fn expand_layers(&self, tokens: &[String]) -> Vec<String>
pub fn expand_layers(&self, tokens: &[String]) -> Vec<String>
Expand KiCad wildcard layer selectors (*.Cu, F&B.Cu, *.Mask, *.Paste, *.SilkS).
Sourcepub fn copper_span(&self, via_layers: &[String]) -> Vec<String>
pub fn copper_span(&self, via_layers: &[String]) -> Vec<String>
Expand a via’s start/end layer span into all spanned copper layer names.
Sourcepub fn standard_layers(&self) -> Vec<FabLayer>
pub fn standard_layers(&self) -> Vec<FabLayer>
Build ordered FabLayer descriptors for the board.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayerMap
impl RefUnwindSafe for LayerMap
impl Send for LayerMap
impl Sync for LayerMap
impl Unpin for LayerMap
impl UnsafeUnpin for LayerMap
impl UnwindSafe for LayerMap
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