pub struct IntLib {
pub version: u32,
pub schlib: SchLib,
pub pcblib: PcbLib,
pub cross_refs: Vec<CrossReference>,
pub parameters: Vec<ComponentParameters>,
}Expand description
An integrated library containing schematic symbols and PCB footprints.
Fields§
§version: u32Version of the IntLib format.
schlib: SchLibEmbedded schematic library.
pcblib: PcbLibEmbedded PCB footprint library.
cross_refs: Vec<CrossReference>Cross-reference entries mapping components to their symbols and footprints.
parameters: Vec<ComponentParameters>Component parameters (BOM data).
Implementations§
Source§impl IntLib
impl IntLib
Sourcepub fn open_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open_file<P: AsRef<Path>>(path: P) -> Result<Self>
Open and read an IntLib file from a path.
Sourcepub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
Save the IntLib to a file path.
Sourcepub fn schematic_component_count(&self) -> usize
pub fn schematic_component_count(&self) -> usize
Get the number of schematic components.
Sourcepub fn footprint_count(&self) -> usize
pub fn footprint_count(&self) -> usize
Get the number of PCB footprints.
Sourcepub fn get_cross_ref(&self, name: &str) -> Option<&CrossReference>
pub fn get_cross_ref(&self, name: &str) -> Option<&CrossReference>
Get cross-reference for a component by name.
Sourcepub fn get_parameters(&self, name: &str) -> Option<&ComponentParameters>
pub fn get_parameters(&self, name: &str) -> Option<&ComponentParameters>
Get parameters for a component by name.
Sourcepub fn component_footprint_map(&self) -> HashMap<String, String>
pub fn component_footprint_map(&self) -> HashMap<String, String>
Get a mapping of component names to their footprints.
Trait Implementations§
Source§impl DumpTree for IntLib
impl DumpTree for IntLib
Source§fn dump(&self, tree: &mut TreeBuilder)
fn dump(&self, tree: &mut TreeBuilder)
Dump this item to the tree builder.
Source§fn dump_to_string(&self) -> String
fn dump_to_string(&self) -> String
Convenience method to dump to a string.
Source§fn dump_to_string_with_options(&self, options: DumpOptions) -> String
fn dump_to_string_with_options(&self, options: DumpOptions) -> String
Convenience method to dump to a string with options.
Auto Trait Implementations§
impl Freeze for IntLib
impl RefUnwindSafe for IntLib
impl Send for IntLib
impl Sync for IntLib
impl Unpin for IntLib
impl UnwindSafe for IntLib
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more