pub struct ParseResult<'pr> { /* private fields */ }Expand description
The result of parsing a source string.
Implementations§
Source§impl<'pr> ParseResult<'pr>
impl<'pr> ParseResult<'pr>
Sourcepub fn frozen_string_literals(&self) -> bool
pub fn frozen_string_literals(&self) -> bool
Returns whether we found a frozen_string_literal magic comment with a true value.
Sourcepub fn as_slice(&self, location: &Location<'pr>) -> &'pr [u8] ⓘ
pub fn as_slice(&self, location: &Location<'pr>) -> &'pr [u8] ⓘ
Returns a slice of the source string that was parsed using the given slice range.
Sourcepub fn errors(&self) -> Diagnostics<'_> ⓘ
pub fn errors(&self) -> Diagnostics<'_> ⓘ
Returns an iterator that can be used to iterate over the errors in the parse result.
Sourcepub fn warnings(&self) -> Diagnostics<'_> ⓘ
pub fn warnings(&self) -> Diagnostics<'_> ⓘ
Returns an iterator that can be used to iterate over the warnings in the parse result.
Sourcepub fn comments(&self) -> Comments<'_> ⓘ
pub fn comments(&self) -> Comments<'_> ⓘ
Returns an iterator that can be used to iterate over the comments in the parse result.
Sourcepub fn magic_comments(&self) -> MagicComments<'_> ⓘ
pub fn magic_comments(&self) -> MagicComments<'_> ⓘ
Returns an iterator that can be used to iterate over the magic comments in the parse result.
Trait Implementations§
Source§impl<'pr> Debug for ParseResult<'pr>
impl<'pr> Debug for ParseResult<'pr>
Auto Trait Implementations§
impl<'pr> Freeze for ParseResult<'pr>
impl<'pr> RefUnwindSafe for ParseResult<'pr>
impl<'pr> !Send for ParseResult<'pr>
impl<'pr> !Sync for ParseResult<'pr>
impl<'pr> Unpin for ParseResult<'pr>
impl<'pr> UnwindSafe for ParseResult<'pr>
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