pub struct Ast<'a> { /* private fields */ }Implementations§
Source§impl<'a> Ast<'a>
impl<'a> Ast<'a>
Sourcepub fn from_str(
src: &'a str,
file_path: Option<Arc<Path>>,
syntax: &Syntax<'_>,
) -> Result<Ast<'a>, ParseError>
pub fn from_str( src: &'a str, file_path: Option<Arc<Path>>, syntax: &Syntax<'_>, ) -> Result<Ast<'a>, ParseError>
If file_path is None, it means the source is an inline template. Therefore, if
a parsing error occurs, we won’t display the path as it wouldn’t be useful.
pub fn nodes(&self) -> &[Box<Node<'a>>]
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Ast<'a>
impl<'a> RefUnwindSafe for Ast<'a>
impl<'a> Send for Ast<'a>
impl<'a> Sync for Ast<'a>
impl<'a> Unpin for Ast<'a>
impl<'a> UnwindSafe for Ast<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more