[][src]Struct leo_ast::LeoAst

pub struct LeoAst<'ast> { /* fields omitted */ }

Implementations

impl<'ast> LeoAst<'ast>[src]

pub fn new(
    file_path: &'ast PathBuf,
    program_string: &'ast str
) -> Result<Self, ParserError>
[src]

Creates a new abstract syntax tree given the file path.

pub fn load_file(file_path: &'ast PathBuf) -> Result<String, ParserError>[src]

Loads the Leo code as a string from the given file path.

pub fn as_repr(&self) -> &File<'ast>[src]

Returns a reference to the inner abstract syntax tree representation.

pub fn to_json_string(&self) -> Result<String, ParserError>[src]

Serializes the abstract syntax tree into a JSON string.

Auto Trait Implementations

impl<'ast> RefUnwindSafe for LeoAst<'ast>

impl<'ast> Send for LeoAst<'ast>

impl<'ast> Sync for LeoAst<'ast>

impl<'ast> Unpin for LeoAst<'ast>

impl<'ast> UnwindSafe for LeoAst<'ast>

Blanket Implementations

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

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

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

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.