pub struct ContentRefused {
pub float_type: String,
pub admitted: String,
}Expand description
The error that is reported when the content of a float is not accepted by
its float type (flm.floats.content-refused).
A float type lists the content handlers that it accepts
(FloatType::handlers). A content handler
(FloatContentHandler) checks the content of
a float, and accepts it or refuses it. The content of a float is accepted
when one of the content handlers of its type accepts it. In the default
configuration, a figure must contain exactly one image, as in
\begin{figure}\includegraphics{plot.png}\caption{A plot}\end{figure}. A
table must contain exactly one table of cells or exactly one image. The
commands \caption, \label and \nonumber, whitespace and comments do
not count as content.
The message lists the content that each available content handler of the
type accepts. A content handler that is not available in the registry
accepts no content, and is reported as MissingHandler. When none of the
content handlers of the type is available, no content can be accepted, and
the message lists the missing content handlers instead.
Reported by the lowering rule of the float, on every backend, at the float. The content is lowered as usual, as if the float type accepted any content.
Fields§
§float_type: StringThe name of the float type, e.g. figure.
admitted: StringThe content that the float type accepts, as the end of the message. It
lists what each available content handler of the type accepts, joined
with or, e.g. exactly one table of cells or exactly one image. When
none of the content handlers of the type is available, it lists the
missing content handlers instead, e.g. content accepted by the missing content handler ‘includegraphics’.
Implementations§
Trait Implementations§
Source§impl Clone for ContentRefused
impl Clone for ContentRefused
Source§impl Debug for ContentRefused
impl Debug for ContentRefused
Source§impl DiagnosticInfo for ContentRefused
impl DiagnosticInfo for ContentRefused
Source§const IDENTIFIER: &'static str = "flm.floats.content-refused"
const IDENTIFIER: &'static str = "flm.floats.content-refused"
<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 ContentRefused
impl Display for ContentRefused
impl Eq for ContentRefused
Source§impl PartialEq for ContentRefused
impl PartialEq for ContentRefused
impl StructuralPartialEq for ContentRefused
Auto Trait Implementations§
impl Forget for ContentRefused
impl Freeze for ContentRefused
impl Move for ContentRefused
impl RefUnwindSafe for ContentRefused
impl Send for ContentRefusedwhere
RawVecInner: Send,
impl Sync for ContentRefusedwhere
RawVecInner: Sync,
impl Unpin for ContentRefused
impl UnsafeUnpin for ContentRefused
impl UnwindSafe for ContentRefusedwhere
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