Struct leo_compiler::Ast
source · pub struct Ast {
pub ast: Program,
}
Expand description
Fields
ast: Program
Implementations
sourceimpl Ast
impl Ast
pub fn into_repr(self) -> Program
sourcepub fn to_json_string(&self) -> Result<String, LeoError>
pub fn to_json_string(&self) -> Result<String, LeoError>
Serializes the ast into a JSON string.
pub fn to_json_value(&self) -> Result<Value, LeoError>
sourcepub fn to_json_file(&self, path: PathBuf, file_name: &str) -> Result<(), LeoError>
pub fn to_json_file(&self, path: PathBuf, file_name: &str) -> Result<(), LeoError>
Serializes the ast into a JSON file.
sourcepub fn to_json_file_without_keys(
&self,
path: PathBuf,
file_name: &str,
excluded_keys: &[&str]
) -> Result<(), LeoError>
pub fn to_json_file_without_keys(
&self,
path: PathBuf,
file_name: &str,
excluded_keys: &[&str]
) -> Result<(), LeoError>
Serializes the ast into a JSON value and removes keys from object mappings before writing to a file.
Trait Implementations
impl Eq for Ast
impl StructuralEq for Ast
impl StructuralPartialEq for Ast
Auto Trait Implementations
impl !RefUnwindSafe for Ast
impl Send for Ast
impl !Sync for Ast
impl Unpin for Ast
impl UnwindSafe for Ast
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more