pub struct SchematicBundleIndex { /* private fields */ }Implementations§
Source§impl SchematicBundleIndex
impl SchematicBundleIndex
Sourcepub fn build_from_admitted_definitions(
bundle: &SourceBundle,
definitions: Vec<ParsedSchematicDefinition>,
) -> Result<Self, SourceBundleError>
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
impl SchematicBundleIndex
Sourcepub fn selected_assembly_variant_context(
&self,
bundle: &SourceBundle,
board: &PcbView<'_>,
name: &str,
) -> Result<KiCadAssemblyVariantContext, SourceBundleError>
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
impl SchematicBundleIndex
Sourcepub fn build(bundle: &SourceBundle) -> Result<Self, SourceBundleError>
pub fn build(bundle: &SourceBundle) -> Result<Self, SourceBundleError>
Scan every schematic source once, then realize the reachable hierarchy.
pub fn build_profiled( bundle: &SourceBundle, ) -> Result<(Self, SchematicBundleIndexBuildProfile), SourceBundleError>
Sourcepub fn diagnostics(&self) -> Vec<KiCadDiagnostic>
pub fn diagnostics(&self) -> Vec<KiCadDiagnostic>
Diagnostics for files and sheets the index repaired instead of stopping, in the stable shared order.
Sourcepub fn removed_sheets(
&self,
source_path: &str,
) -> impl Iterator<Item = usize> + '_
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.
Sourcepub fn unreadable_sources(
&self,
) -> impl Iterator<Item = (&str, &SourceBundleError)>
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.
Sourcepub fn source_text<'a>(
&'a self,
bundle: &'a SourceBundle,
path: &str,
) -> Result<Option<&'a str>, SourceBundleError>
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).
pub fn definitions(&self) -> impl ExactSizeIterator<Item = &SchematicDefinition>
pub fn subpart_settings(&self) -> SchematicSubpartSettings
pub fn project_bus_aliases(&self) -> &[ProjectBusAlias]
pub fn definition(&self, source_path: &str) -> Option<&SchematicDefinition>
pub fn occurrences(&self) -> impl ExactSizeIterator<Item = &SchematicOccurrence>
pub fn occurrence( &self, occurrence_index: usize, ) -> Option<&SchematicOccurrence>
pub fn project_name(&self) -> &str
Sourcepub fn root_sheet_name(&self) -> &str
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.
Sourcepub fn project_file(&self) -> &str
pub fn project_file(&self) -> &str
Portable filename used by the compiled-graph identity scope.
Sourcepub fn portable_source_path<'a>(&self, source_path: &'a str) -> &'a str
pub fn portable_source_path<'a>(&self, source_path: &'a str) -> &'a str
Return a source path relative to the project/top-schematic directory.
pub fn effective_symbols( &self, occurrence_index: usize, variant_name: Option<&str>, ) -> Result<Vec<SchematicEffectiveSymbol>, SourceBundleError>
pub fn symbol_terminals( &self, occurrence_index: usize, ) -> Result<Vec<SchematicSymbolTerminal>, SourceBundleError>
Trait Implementations§
Source§impl Clone for SchematicBundleIndex
impl Clone for SchematicBundleIndex
Source§fn clone(&self) -> SchematicBundleIndex
fn clone(&self) -> SchematicBundleIndex
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more