Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

SchematicBundleIndex

Struct SchematicBundleIndex 

Source
pub struct SchematicBundleIndex { /* private fields */ }

Implementations§

Source§

impl SchematicBundleIndex

Source

pub fn build_from_admitted_definitions( bundle: &SourceBundle, definitions: Vec<ParsedSchematicDefinition>, ) -> Result<Self, SourceBundleError>

Reuse one admitted definition per current schematic Source. Reorder to ordinary root-first/manifest path order and realize fresh hierarchy/settings. max_occurrences controls the fresh hierarchy, not definition parse admission.

Source§

impl SchematicBundleIndex

Source

pub fn selected_assembly_variant_context( &self, bundle: &SourceBundle, board: &PcbView<'_>, name: &str, ) -> Result<KiCadAssemblyVariantContext, SourceBundleError>

Resolve one exact named project variant from the same captured bundle and acquired board families. Unknown/ambiguous scopes remain explicit diagnostics.

Source§

impl SchematicBundleIndex

Source

pub fn build(bundle: &SourceBundle) -> Result<Self, SourceBundleError>

Scan every schematic source once, then realize the reachable hierarchy.

Source

pub fn build_profiled( bundle: &SourceBundle, ) -> Result<(Self, SchematicBundleIndexBuildProfile), SourceBundleError>

Source

pub fn diagnostics(&self) -> Vec<KiCadDiagnostic>

Diagnostics for files and sheets the index repaired instead of stopping, in the stable shared order.

Source

pub fn removed_sheets( &self, source_path: &str, ) -> impl Iterator<Item = usize> + '_

Sheet indices, in source order, that KiCad removes from the file at source_path because they repeat an ancestor.

Source

pub fn unreadable_sources( &self, ) -> impl Iterator<Item = (&str, &SourceBundleError)>

Files that could not be read or parsed and are empty pages, with the parse error, by bundle path.

Source

pub fn source_text<'a>( &'a self, bundle: &'a SourceBundle, path: &str, ) -> Result<Option<&'a str>, SourceBundleError>

Source text every stage reads for path: the bundle bytes, or the index’s repaired text (unique UUIDs, or an empty page).

Source

pub fn definitions(&self) -> impl ExactSizeIterator<Item = &SchematicDefinition>

Source

pub fn subpart_settings(&self) -> SchematicSubpartSettings

Source

pub fn project_bus_aliases(&self) -> &[ProjectBusAlias]

Source

pub fn definition(&self, source_path: &str) -> Option<&SchematicDefinition>

Source

pub fn occurrences(&self) -> impl ExactSizeIterator<Item = &SchematicOccurrence>

Source

pub fn occurrence( &self, occurrence_index: usize, ) -> Option<&SchematicOccurrence>

Source

pub fn project_name(&self) -> &str

Source

pub fn root_sheet_name(&self) -> &str

The root sheet’s name as KiCad 10.0.8 loads it, which ${SHEETNAME} shows on the root page: see crate::ProjectView::root_sheet_name.

Source

pub fn project_file(&self) -> &str

Portable filename used by the compiled-graph identity scope.

Source

pub fn portable_source_path<'a>(&self, source_path: &'a str) -> &'a str

Return a source path relative to the project/top-schematic directory.

Source

pub fn effective_symbols( &self, occurrence_index: usize, variant_name: Option<&str>, ) -> Result<Vec<SchematicEffectiveSymbol>, SourceBundleError>

Source

pub fn symbol_terminals( &self, occurrence_index: usize, ) -> Result<Vec<SchematicSymbolTerminal>, SourceBundleError>

Trait Implementations§

Source§

impl Clone for SchematicBundleIndex

Source§

fn clone(&self) -> SchematicBundleIndex

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchematicBundleIndex

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.