[][src]Struct liberty_parse::ast::LibertyAst

pub struct LibertyAst(pub Vec<GroupItem>);

Liberty file AST representation

Each liberty file can have one or more librarys defined in it, which are represented as a GroupItem::Group variant.

Methods

impl LibertyAst[src]

pub fn new(libs: Vec<GroupItem>) -> Self[src]

Create a new AST from a vector of GroupItems

pub fn from_string(input: &str) -> ParseResult<Self>[src]

Parse a Liberty file's string representation into the AST

pub fn to_string(&self) -> String[src]

Get a String representation from an AST

pub fn into_liberty(self) -> Liberty[src]

Convert an AST into a Liberty struct

pub fn from_liberty(lib: Liberty) -> Self[src]

Convert a Liberty struct into an AST

Trait Implementations

impl Debug for LibertyAst[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]