Struct spefparse::SPEF

source ·
pub struct SPEF {
    pub header: SPEFHeader,
    pub top_ports: Vec<SPEFPort>,
    pub nets: Vec<SPEFNet>,
}
Expand description

SPEF main struct. It contains headers, top ports, and nets.

SPEF can be constructed by parsing a source &str using SPEF::parse_str. SPEF can be dumpped to a source file string using std::fmt::Display.

Fields§

§header: SPEFHeader§top_ports: Vec<SPEFPort>§nets: Vec<SPEFNet>

Implementations§

source§

impl SPEF

source

pub fn parse_str(s: &str) -> Result<SPEF, String>

Parse a SPEF source string to the SPEF object. This is the main entry.

On error, it returns a pretty string message indicating where it is not working.

Trait Implementations§

source§

impl Debug for SPEF

source§

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

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

impl Display for SPEF

source§

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

Dump SPEF object to SPEF source by just formatting it using "{}" (Display).

Auto Trait Implementations§

§

impl RefUnwindSafe for SPEF

§

impl Send for SPEF

§

impl Sync for SPEF

§

impl Unpin for SPEF

§

impl UnwindSafe for SPEF

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToCompactString for Twhere T: Display,

source§

fn to_compact_string(&self) -> CompactString

Converts the given value to a CompactString. Read more
source§

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

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.