pub enum DefinitionProblem {
NoTemplate,
NotCompiled,
NotInForceInMode {
mode: Mode,
},
UnknownDefault {
key: String,
},
Minting {
detail: String,
},
ParseFailed {
detail: String,
},
TackOnPlaceholder {
reference: String,
},
}Expand description
What is wrong with a definition as a whole: the detail of BadDefinition.
Variants§
NoTemplate
The definition declares no template at all (its content is None).
NotCompiled
The definition was refused when the registry was built, so a use site has nothing to expand into; the reason was reported then, among the registry’s build diagnostics. A use site that the expand pass reaches before the templates are compiled has this problem too.
NotInForceInMode
The use site is in a parsing mode where the definition does not apply. The definition was declared for both modes with one template text, and that text parses only in the other mode, which is then the only mode where the definition applies (running text, or a formula).
UnknownDefault
A default value is declared for an argument the definition does not have.
Minting
The template language could not be built: minting its
declarations, which turns them into the techy packages a parse looks
commands up in, failed. Those declarations are constants of the
template module, so this is not expected to happen.
ParseFailed
The template parse returned no tree: the template’s parsing state could not be prepared, the recursion guard refused deeply nested content, or the parse was aborted.
TackOnPlaceholder
The template refers to a tack-on argument: the argument that absorbs
the field macros written at its position in a call, after the arguments
declared before it, such as the \label{…} of
\thm{Euclid}\label{thm:euclid} (see
fields).
A template cannot use what a tack-on argument absorbs, on any backend: what
was absorbed is a run of whole macros, and those macros have no meaning as
the content of a placeholder (a \label has no meaning on its own in the
content a template produces). A definition may declare a tack-on argument and
leave it unused; referring to it is this problem. Reading the absorbed
information through a placeholder that queries it is intended and not
implemented.
Implementations§
Trait Implementations§
Source§impl Clone for DefinitionProblem
impl Clone for DefinitionProblem
Source§impl Debug for DefinitionProblem
impl Debug for DefinitionProblem
impl Eq for DefinitionProblem
Source§impl PartialEq for DefinitionProblem
impl PartialEq for DefinitionProblem
impl StructuralPartialEq for DefinitionProblem
Source§impl ToDiagnosticValue for DefinitionProblem
Diagnostic data: a map holding the kind token
and the fields: the mode of a use site where the definition does not
apply (text or math), the key of an unknown default value, the
detail of a minting or parse failure (the failure’s own text, not this
module’s wording), or the reference of a placeholder that refers to a
tack-on argument.
impl ToDiagnosticValue for DefinitionProblem
Diagnostic data: a map holding the kind token
and the fields: the mode of a use site where the definition does not
apply (text or math), the key of an unknown default value, the
detail of a minting or parse failure (the failure’s own text, not this
module’s wording), or the reference of a placeholder that refers to a
tack-on argument.
Source§fn to_diagnostic_value(&self) -> DiagnosticValue
fn to_diagnostic_value(&self) -> DiagnosticValue
Auto Trait Implementations§
impl Forget for DefinitionProblem
impl Freeze for DefinitionProblem
impl Move for DefinitionProblem
impl RefUnwindSafe for DefinitionProblem
impl Send for DefinitionProblemwhere
RawVecInner: Send,
impl Sync for DefinitionProblemwhere
RawVecInner: Sync,
impl Unpin for DefinitionProblem
impl UnsafeUnpin for DefinitionProblem
impl UnwindSafe for DefinitionProblemwhere
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<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