Skip to main content

IntLib

Struct IntLib 

Source
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: u32

Version of the IntLib format.

§schlib: SchLib

Embedded schematic library.

§pcblib: PcbLib

Embedded 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

Source

pub fn open<R: Read + Seek>(reader: R) -> Result<Self>

Open and read an IntLib file.

Source

pub fn open_file<P: AsRef<Path>>(path: P) -> Result<Self>

Open and read an IntLib file from a path.

Source

pub fn save<W: Read + Write + Seek>(&self, writer: W) -> Result<()>

Save the IntLib to a file.

Source

pub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>

Save the IntLib to a file path.

Source

pub fn schematic_component_count(&self) -> usize

Get the number of schematic components.

Source

pub fn footprint_count(&self) -> usize

Get the number of PCB footprints.

Source

pub fn get_cross_ref(&self, name: &str) -> Option<&CrossReference>

Get cross-reference for a component by name.

Source

pub fn get_parameters(&self, name: &str) -> Option<&ComponentParameters>

Get parameters for a component by name.

Source

pub fn component_footprint_map(&self) -> HashMap<String, String>

Get a mapping of component names to their footprints.

Trait Implementations§

Source§

impl Debug for IntLib

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IntLib

Source§

fn default() -> IntLib

Returns the “default value” for a type. Read more
Source§

impl DumpTree for IntLib

Source§

fn dump(&self, tree: &mut TreeBuilder)

Dump this item to the tree builder.
Source§

fn dump_to_string(&self) -> String

Convenience method to dump to a string.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool