pub struct RustParser { /* private fields */ }Implementations§
Source§impl RustParser
impl RustParser
pub fn new() -> Self
Sourcepub fn parse_file(
&self,
content: &str,
path: &Path,
) -> Result<FileNode, ParseError>
pub fn parse_file( &self, content: &str, path: &Path, ) -> Result<FileNode, ParseError>
Parse a Rust source file contents into a FileNode with items and imports.
§Errors
Returns ParseError when the input cannot be parsed due to invalid UTF-8 or other parser failures.
Trait Implementations§
Source§impl Debug for RustParser
impl Debug for RustParser
Source§impl Default for RustParser
impl Default for RustParser
Source§fn default() -> RustParser
fn default() -> RustParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RustParser
impl RefUnwindSafe for RustParser
impl Send for RustParser
impl Sync for RustParser
impl Unpin for RustParser
impl UnwindSafe for RustParser
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more