pub struct RuleFailed {
pub backend: String,
pub rule: String,
pub element: String,
pub detail: String,
}Expand description
The error that is reported when a lowering rule fails at a node
(flm.lowering.rule-failed).
A lowering rule fails when it returns a
LowerError. This error is usually
caused by a fault of the rule. For instance, the rule reads a table or an
option that it did not declare, stages a presentation element that is not
listed in its produces declaration, or finds a node structure that it
does not expect. A rule also fails when a synthesized
value that it splices
(Lowerer::splice) cannot be
brought up to date.
Reported by the lowering driver at the node. The node is replaced by a
flm.pres.unsupported node without children.
Some kinds of LowerError are handled differently:
LowerError::Refused: the diagnostic that the error contains is reported in place of this error, and the node is replaced in the same way. A rule returns this error to report a problem of the document in terms that the author can act on, as the user-definitions feature does withKeptTemplateDeclaresPoint.LowerError::RegionNotFoundis reported asRegionNotFound.LowerError::Buildstops the lowering of the whole tree, and is reported asLoweringFailed.
Fields§
§backend: StringThe name of the backend.
rule: StringThe name of the lowering rule.
element: StringThe name of the element of the node.
detail: StringThe message of the LowerError
that the rule returned.
Implementations§
Trait Implementations§
Source§impl Clone for RuleFailed
impl Clone for RuleFailed
Source§impl Debug for RuleFailed
impl Debug for RuleFailed
Source§impl DiagnosticInfo for RuleFailed
impl DiagnosticInfo for RuleFailed
Source§const IDENTIFIER: &'static str = "flm.lowering.rule-failed"
const IDENTIFIER: &'static str = "flm.lowering.rule-failed"
<crate-or-lang>.<area>.<condition>. Read moreSource§fn serializable_data(&self) -> DiagnosticValue
fn serializable_data(&self) -> DiagnosticValue
Source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
Source§impl Display for RuleFailed
impl Display for RuleFailed
impl Eq for RuleFailed
Source§impl PartialEq for RuleFailed
impl PartialEq for RuleFailed
impl StructuralPartialEq for RuleFailed
Auto Trait Implementations§
impl Forget for RuleFailed
impl Freeze for RuleFailed
impl Move for RuleFailed
impl RefUnwindSafe for RuleFailed
impl Send for RuleFailedwhere
RawVecInner: Send,
impl Sync for RuleFailedwhere
RawVecInner: Sync,
impl Unpin for RuleFailed
impl UnsafeUnpin for RuleFailed
impl UnwindSafe for RuleFailedwhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DiagnosticData for Twhere
T: DiagnosticInfo,
impl<T> DiagnosticData for Twhere
T: DiagnosticInfo,
Source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
DiagnosticInfo::identifier — for every
ordinary condition, the IDENTIFIER const).Source§fn serializable_data(&self) -> DiagnosticValue
fn serializable_data(&self) -> DiagnosticValue
DiagnosticInfo::serializable_data).Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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