pub enum SpliceFailure {
NestingTooDeep(FlmDiagnostic),
Failed(FlmDiagnostic),
WorkerThread(FlmDiagnostic),
}Expand description
The failure of a call to splice that returned no tree.
Each variant carries the one Error diagnostic that explains the absent tree,
positioned at the root of the tree the pass was called on;
diagnostic returns it for every variant.
The input feature’s rewrite stage records it in place of the tree.
Variants§
NestingTooDeep(FlmDiagnostic)
The recursion guard refused to descend further:
the content is nested too deeply. The diagnostic carries
NestingTooDeep (flm.blocks.nesting-too-deep).
Failed(FlmDiagnostic)
The pass failed for a reason in the program, not in the document. The
diagnostic carries SpliceFailed (flm.input.splice-failed).
WorkerThread(FlmDiagnostic)
The pass was not attempted: the calling thread is not a worker
thread and the operating system
refused to create one. The diagnostic carries
WorkerThreadUnavailable (flm.lang.worker-thread-unavailable).
Implementations§
Source§impl SpliceFailure
impl SpliceFailure
Sourcepub fn diagnostic(&self) -> &FlmDiagnostic
pub fn diagnostic(&self) -> &FlmDiagnostic
The Error diagnostic that explains the absent tree.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SpliceFailure
impl !UnwindSafe for SpliceFailure
impl Forget for SpliceFailure
impl Freeze for SpliceFailurewhere
*const dyn DiagnosticData is !null: Freeze,
PhantomData<dyn DiagnosticData>: Freeze,
*const ArcInner<Source<FlmOrigin>> is !null: Freeze,
PhantomData<ArcInner<Source<FlmOrigin>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<TraceFrame<FlmOrigin>>: Freeze,
impl Move for SpliceFailure
impl Send for SpliceFailure
impl Sync for SpliceFailure
impl Unpin for SpliceFailure
impl UnsafeUnpin for SpliceFailurewhere
*const dyn DiagnosticData is !null: UnsafeUnpin,
PhantomData<dyn DiagnosticData>: UnsafeUnpin,
*const ArcInner<Source<FlmOrigin>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Source<FlmOrigin>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<TraceFrame<FlmOrigin>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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> ⓘ
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> ⓘ
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