Schematic

Struct Schematic 

Source
pub struct Schematic<I> {
Show 13 fields pub version: Version<I>, pub vhdl_property: Option<VhdlProperty<I>>, pub symbol_property: Option<SymbolProperty<I>>, pub verilog_property: Option<VerilogProperty<I>>, pub spice_property: Option<SpiceProperty<I>>, pub tedax_property: Option<TedaXProperty<I>>, pub texts: Objects<Text<I>>, pub lines: Objects<Line<I>>, pub rectangles: Objects<Rectangle<I>>, pub polygons: Objects<Polygon<I>>, pub arcs: Objects<Arc<I>>, pub wires: Objects<Wire<I>>, pub components: Objects<Component<I>>,
}
Expand description

Xschem schematic (or symbol).

Fields§

§version: Version<I>§vhdl_property: Option<VhdlProperty<I>>§symbol_property: Option<SymbolProperty<I>>§verilog_property: Option<VerilogProperty<I>>§spice_property: Option<SpiceProperty<I>>§tedax_property: Option<TedaXProperty<I>>§texts: Objects<Text<I>>§lines: Objects<Line<I>>§rectangles: Objects<Rectangle<I>>§polygons: Objects<Polygon<I>>§arcs: Objects<Arc<I>>§wires: Objects<Wire<I>>§components: Objects<Component<I>>

Implementations§

Source§

impl<'a> Schematic<Span<'a>>

Source

pub fn parse_str<I: AsRef<str> + ?Sized>( input: &'a I, ) -> Result<Self, Error<Span<'a>>>

Parses a string as a Schematic.

Source§

impl<'a, X: Clone> Schematic<Span<'a, X>>

Source

pub fn parse_str_with_extra<I: AsRef<str> + ?Sized>( input: &'a I, extra: X, ) -> Result<Self, Error<Span<'a, X>>>

Parses a string as a Schematic.

Source§

impl<'a> Schematic<ByteSpan<'a>>

Source

pub fn parse_slice<I: AsRef<[u8]> + ?Sized>( input: &'a I, ) -> Result<Self, Error<ByteSpan<'a>>>

Parses bytes as a Schematic.

Source§

impl<'a, X: Clone> Schematic<ByteSpan<'a, X>>

Source

pub fn parse_slice_with_extra<I: AsRef<[u8]> + ?Sized>( input: &'a I, extra: X, ) -> Result<Self, Error<ByteSpan<'a, X>>>

Parses a string as a Schematic.

Source§

impl<'a, X: Clone> Schematic<Span<'a, X>>

Source

pub fn parse_span(input: Span<'a, X>) -> Result<Self, Error<Span<'a, X>>>

Parses a string span as a Schematic.

Source§

impl<'a, X: Clone> Schematic<ByteSpan<'a, X>>

Source

pub fn parse_span( input: ByteSpan<'a, X>, ) -> Result<Self, Error<ByteSpan<'a, X>>>

Parses a string span as a Schematic.

Source§

impl<I> Schematic<I>

Source

pub fn new(version: Version<I>) -> Self

Source

pub fn add_object(self, object: Object<I>) -> Self

Trait Implementations§

Source§

impl<I: Clone> Clone for Schematic<I>

Source§

fn clone(&self) -> Schematic<I>

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl<I: Debug> Debug for Schematic<I>

Source§

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

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

impl<I: Default> Default for Schematic<I>

Source§

fn default() -> Schematic<I>

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

impl<I> Display for Schematic<I>
where I: Display,

Source§

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

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

impl<I> From<Embedding<I>> for Schematic<I>

Source§

fn from(value: Embedding<I>) -> Self

Converts to this type from the input type.
Source§

impl<I> From<Schematic<I>> for Embedding<I>

Source§

fn from(value: Schematic<I>) -> Self

Converts to this type from the input type.
Source§

impl<I: PartialEq> PartialEq for Schematic<I>
where Property<I>: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, X: Clone + Default> TryFrom<&'a [u8]> for Schematic<ByteSpan<'a, X>>

Source§

fn try_from(value: &'a [u8]) -> Result<Self, Self::Error>

Tries to parse a schematic from a slice.

Source§

type Error = Error<LocatedSpan<&'a [u8], X>>

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

impl<'a, X: Clone + Default> TryFrom<&'a str> for Schematic<Span<'a, X>>

Source§

fn try_from(value: &'a str) -> Result<Self, Self::Error>

Tries to parse a schematic from a str.

Source§

type Error = Error<LocatedSpan<&'a str, X>>

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

impl<'a, X: Clone> TryFrom<LocatedSpan<&'a [u8], X>> for Schematic<ByteSpan<'a, X>>

Source§

fn try_from(value: ByteSpan<'a, X>) -> Result<Self, Self::Error>

Tries to parse a schematic from a spanned slice.

Source§

type Error = Error<LocatedSpan<&'a [u8], X>>

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

impl<'a, X: Clone> TryFrom<LocatedSpan<&'a str, X>> for Schematic<Span<'a, X>>

Source§

fn try_from(value: Span<'a, X>) -> Result<Self, Self::Error>

Tries to parse a schematic from a spanned str.

Source§

type Error = Error<LocatedSpan<&'a str, X>>

The type returned in the event of a conversion error.

Auto Trait Implementations§

§

impl<I> Freeze for Schematic<I>
where I: Freeze,

§

impl<I> RefUnwindSafe for Schematic<I>
where I: RefUnwindSafe,

§

impl<I> Send for Schematic<I>
where I: Send,

§

impl<I> Sync for Schematic<I>
where I: Sync,

§

impl<I> Unpin for Schematic<I>
where I: Unpin,

§

impl<I> UnwindSafe for Schematic<I>
where I: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> ToString for T
where T: Display + ?Sized,

§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.