pub struct IncludedFile {
pub name: String,
pub text: String,
pub first_line: usize,
pub parsing: Option<FlmParsing>,
pub problems: Vec<IncludedFileProblem>,
pub heading: Option<InputHeading>,
}Expand description
An IncludedFile contains the content of an included file and the
information that the input resolver read from the front matter of the file.
An InputResolver returns an IncludedFile for each \input command.
The fields have defaults, so a resolver that reads no front matter only
sets name, text and
first_line.
Fields§
§name: StringThe name that identifies the file, for instance its canonical path.
Diagnostics refer to the file by this name. The library also compares
names to detect a file that includes itself (InputIncludesItself)
and a heading input that is included twice (InputPlacedTwice).
Therefore, two references to the same file must give the same name, and
two different files must have different names. The name of the primary
file is the canonical path of its origin.
text: StringThe content of the file, without its front matter.
first_line: usizeThe line of the file on which text begins, counted from
one.
The library uses this number to report a problem in the content at its line in the file. For a file without front matter, the value is one. The value zero counts as one.
parsing: Option<FlmParsing>The parsing settings of the content, if parsing settings are written in the file itself, for instance in its front matter.
The value is complete: it contains the parsing settings that the
library passes to InputResolver::resolve, with the settings of the
file applied over them. With None, the content is parsed under the
parsing state in effect at the \input command.
problems: Vec<IncludedFileProblem>The problems that the input resolver found in the front matter of the file.
The library reports each problem as an error
(IncludedFrontMatterProblem) and still includes the file.
heading: Option<InputHeading>The heading of a heading input, or None for a content input.
See content inputs and heading inputs for the two kinds of included files.
Trait Implementations§
Source§impl Clone for IncludedFile
impl Clone for IncludedFile
Source§impl Debug for IncludedFile
impl Debug for IncludedFile
Source§impl Default for IncludedFile
impl Default for IncludedFile
impl Eq for IncludedFile
Source§impl PartialEq for IncludedFile
impl PartialEq for IncludedFile
impl StructuralPartialEq for IncludedFile
Auto Trait Implementations§
impl Forget for IncludedFile
impl Freeze for IncludedFile
impl Move for IncludedFile
impl RefUnwindSafe for IncludedFile
impl Send for IncludedFile
impl Sync for IncludedFile
impl Unpin for IncludedFile
impl UnsafeUnpin for IncludedFile
impl UnwindSafe for IncludedFile
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