pub struct ParsedFailedBlock<'a> {
pub raw: Cow<'a, str>,
pub error: String,
pub source: Option<SourceSpan>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
Failed block retained by a tolerant parse.
Fields§
§raw: Cow<'a, str>Raw source text for the failed block.
error: StringHuman-readable parse error.
source: Option<SourceSpan>Source location for the failed block, when available.
diagnostics: Vec<Diagnostic>Diagnostics attached to this failed block.
Implementations§
Source§impl<'a> ParsedFailedBlock<'a>
impl<'a> ParsedFailedBlock<'a>
Sourcepub fn from_failed_block(
index: usize,
failed: FailedBlock<'a>,
source_map: Option<&SourceMap<'_>>,
) -> Self
pub fn from_failed_block( index: usize, failed: FailedBlock<'a>, source_map: Option<&SourceMap<'_>>, ) -> Self
Create failed-block metadata from a retained failed block.
Sourcepub fn into_owned(self) -> ParsedFailedBlock<'static>
pub fn into_owned(self) -> ParsedFailedBlock<'static>
Convert this failed block into an owned value.
Trait Implementations§
Source§impl<'a> Clone for ParsedFailedBlock<'a>
impl<'a> Clone for ParsedFailedBlock<'a>
Source§fn clone(&self) -> ParsedFailedBlock<'a>
fn clone(&self) -> ParsedFailedBlock<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ParsedFailedBlock<'a>
impl<'a> Debug for ParsedFailedBlock<'a>
Source§impl<'a> PartialEq for ParsedFailedBlock<'a>
impl<'a> PartialEq for ParsedFailedBlock<'a>
Source§fn eq(&self, other: &ParsedFailedBlock<'a>) -> bool
fn eq(&self, other: &ParsedFailedBlock<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> Eq for ParsedFailedBlock<'a>
impl<'a> StructuralPartialEq for ParsedFailedBlock<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParsedFailedBlock<'a>
impl<'a> RefUnwindSafe for ParsedFailedBlock<'a>
impl<'a> Send for ParsedFailedBlock<'a>
impl<'a> Sync for ParsedFailedBlock<'a>
impl<'a> Unpin for ParsedFailedBlock<'a>
impl<'a> UnsafeUnpin for ParsedFailedBlock<'a>
impl<'a> UnwindSafe for ParsedFailedBlock<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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