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

KiCadDiagnosticCode

Enum KiCadDiagnosticCode 

Source
pub enum KiCadDiagnosticCode {
    SheetFileMissing,
    SheetFileUnreadable,
    SheetRecursion,
    UuidRepeated,
    ObjectNotDrawn,
    ComponentUnitRepeated,
    ComponentUnitDefinitionsDiffer,
    ProjectUnreadable,
    ConnectivityNotCompiled,
    PinContactEvidenceDiffers,
    PinIdentityRepeated,
    BusAliasCycle,
}
Expand description

Stable diagnostic codes. Each one names the KiCad behaviour it follows.

Variants§

§

SheetFileMissing

A sheet whose file is missing keeps its sheet symbol and gets an empty page; loading continues (eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp:264-296).

§

SheetFileUnreadable

A sheet whose file cannot be read or parsed gets an empty page and the rest of the hierarchy loads; only the root sheet stops KiCad (eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp:269-283). KiCad Monkey also draws an empty root page instead of stopping.

§

SheetRecursion

A sheet that repeats one of its direct ancestors is not loaded, gets no page, and its sheet symbol is removed from the parent page (eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp:217-237; eeschema/sch_sheet_path.cpp:1116-1144).

§

UuidRepeated

A UUID repeated within one file is made unique while loading, by incrementing it until it is unused (eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp:118-128).

§

ObjectNotDrawn

KiCad Monkey could not draw this object; it is left out and the rest of the page is drawn.

§

ComponentUnitRepeated

Several symbols claim the same unit of one reference. KiCad’s netlist takes a multi-unit reference once and keeps one pin per pin number (eeschema/netlist_exporters/netlist_exporter_base.cpp:231-270,457).

§

ComponentUnitDefinitionsDiffer

Units of one reference use different cached library symbols. Each unit draws its own; the netlist takes the component’s library facts from its first unit (eeschema/netlist_exporters/netlist_exporter_base.cpp:254-303).

§

ProjectUnreadable

The project file could not be read; its settings are left out and KiCad’s defaults are used.

§

ConnectivityNotCompiled

KiCad Monkey could not compile the design’s connectivity. Every page is still drawn; nets, terminals and their bindings are left out.

§

PinContactEvidenceDiffers

Drawn pins of one symbol that share a number reach one contact with different source or no-connect evidence. KiCad’s netlist keeps one pin per number (eeschema/netlist_exporters/netlist_exporter_base.cpp: 402-447); the contact keeps the first pin’s evidence. Not yet checked against KiCad for the no-connect marker.

§

PinIdentityRepeated

Drawn pins of one symbol that share a number have no saved pin UUID to tell them apart and reach different nets. KiCad gives each a new UUID on load and keeps them apart (eeschema/sch_symbol.cpp:1288-1311); the compiled graph has no stable identity for the later pin, so its terminal keeps the first pin’s net. The netlist lists every net.

§

BusAliasCycle

A bus label’s expansion met an alias again inside its own expansion; the repeated alias is one scalar bus member. KiCad looks a name up as an alias only where it is a bus group member and configures each alias member as a label, so a bare member name is a plain net and aliases cannot loop (eeschema/sch_connection.cpp:184-205). KiCad Monkey also expands bare alias members, so its members can differ from KiCad’s.

Implementations§

Source§

impl KiCadDiagnosticCode

Source

pub const fn as_str(self) -> &'static str

Source

pub const fn severity(self) -> KiCadDiagnosticSeverity

Source§

impl KiCadDiagnosticCode

Source

pub const fn concerns_drawing(self) -> bool

Whether the diagnostic is about what a page draws. Connectivity and component facts stay on the compilation and are not page diagnostics.

Trait Implementations§

Source§

impl Clone for KiCadDiagnosticCode

Source§

fn clone(&self) -> KiCadDiagnosticCode

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 Copy for KiCadDiagnosticCode

Source§

impl Debug for KiCadDiagnosticCode

Source§

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

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

impl Display for KiCadDiagnosticCode

Source§

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

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

impl Eq for KiCadDiagnosticCode

Source§

impl Hash for KiCadDiagnosticCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for KiCadDiagnosticCode

Source§

fn cmp(&self, other: &KiCadDiagnosticCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for KiCadDiagnosticCode

Source§

fn eq(&self, other: &KiCadDiagnosticCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for KiCadDiagnosticCode

Source§

fn partial_cmp(&self, other: &KiCadDiagnosticCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for KiCadDiagnosticCode

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.