pub struct InputHeading {
pub command: String,
pub title: String,
pub title_at: Option<(usize, usize)>,
pub label: Option<String>,
pub numbered: bool,
}Expand description
An InputHeading describes the heading of a heading input
(IncludedFile::heading).
The library writes the heading as FLM source before the content of the
file, and parses it with the content. For instance, the heading command
section, the title Methods and the label sec:methods give
\section{Methods}\label{sec:methods}. An unnumbered heading uses the
starred form of the command, as in \section*{Methods}.
The command is parsed like any command written in the document. The library
does not check that the command is a heading command. It only checks that
command is a valid command name
(InputHeadingCommandInvalid) and that label contains
no brace (InputHeadingLabelInvalid).
Fields§
§command: StringThe name of the heading command, without the backslash, for instance
section.
title: StringThe title, as FLM source, for instance The \emph{Art}.
title_at: Option<(usize, usize)>The line and the column of the title in the file, both counted from
one, or None if the title is not written in the file.
The library uses this position to report a problem in the title at its place in the file.
label: Option<String>The label of the heading, if the heading has one.
numbered: boolWhether the heading is numbered. If false, the library writes the
starred form of the heading command. The default is false.
Trait Implementations§
Source§impl Clone for InputHeading
impl Clone for InputHeading
Source§impl Debug for InputHeading
impl Debug for InputHeading
Source§impl Default for InputHeading
impl Default for InputHeading
impl Eq for InputHeading
Source§impl PartialEq for InputHeading
impl PartialEq for InputHeading
impl StructuralPartialEq for InputHeading
Auto Trait Implementations§
impl Forget for InputHeading
impl Freeze for InputHeading
impl Move for InputHeading
impl RefUnwindSafe for InputHeading
impl Send for InputHeading
impl Sync for InputHeading
impl Unpin for InputHeading
impl UnsafeUnpin for InputHeading
impl UnwindSafe for InputHeading
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