Skip to main content

SchematicView

Struct SchematicView 

Source
pub struct SchematicView {
    pub sheet_name: Option<String>,
    pub components: Vec<ComponentView>,
    pub nets: Vec<NetView>,
    pub ports: Vec<PortView>,
    pub power_symbols: Vec<PowerView>,
    pub wires: Vec<WireView>,
    pub labels: Vec<LabelView>,
    pub junctions: Vec<JunctionView>,
    /* private fields */
}
Expand description

High-level schematic document view with connectivity

Fields§

§sheet_name: Option<String>

Sheet name/title

§components: Vec<ComponentView>

All components

§nets: Vec<NetView>

All nets (computed from connectivity)

§ports: Vec<PortView>

All ports

§power_symbols: Vec<PowerView>

All power symbols

§wires: Vec<WireView>

All wires

§labels: Vec<LabelView>

All net labels

§junctions: Vec<JunctionView>

All junctions

Implementations§

Source§

impl SchematicView

Source

pub fn from_schdoc(doc: &SchDoc) -> Self

Build a schematic view from a SchDoc

Source

pub fn get_component(&self, designator: &str) -> Option<&ComponentView>

Get component by designator

Source

pub fn get_net(&self, name: &str) -> Option<&NetView>

Get net by name

Source

pub fn power_nets(&self) -> Vec<&str>

Get all power net names

Source

pub fn ground_nets(&self) -> Vec<&str>

Get all ground net names

Source

pub fn find_components_by_part(&self, pattern: &str) -> Vec<&ComponentView>

Find components by part name pattern

Source

pub fn get_pins(&self, designator: &str) -> Vec<&PinView>

Get all pins for a component

Trait Implementations§

Source§

impl Debug for SchematicView

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