pub struct PackageRequest {
pub package: String,
pub by_engine: [Option<PackageLine>; 3],
}Expand description
One package of a style file’s package block: under each engine the family
knows, the \RequirePackage line the block writes for it (the merged
options and the identifiers of the requests behind them), or nothing where
no request asks for the package under that engine.
merge_requests makes one of these from every request for one package,
and style_body writes it: each line under a
comment line that lists its ids, so that a reader of
the style file can find what asked for the line (every request, where
several were merged into one), once where the line is the same under every
engine and inside a test of the engine where it differs.
A caller may merge requests in groups and write the groups one after
another, as the latex-recomposed backend does: the library’s requests
together with the author’s requests
(extra_packages)
form one group, and the author’s requests for a package listed in the
render option
skip_packages
form another. A package never appears in both groups, so the file still
holds one line per package.
Fields§
§package: StringThe package’s name as \RequirePackage takes it (fontenc).
by_engine: [Option<PackageLine>; 3]The line under each engine of ENGINES, in that order.
Implementations§
Source§impl PackageRequest
impl PackageRequest
Sourcepub fn for_engine(&self, engine: Engine) -> Option<&PackageLine>
pub fn for_engine(&self, engine: Engine) -> Option<&PackageLine>
The line under engine, or None where nothing requests the package
under it.
Sourcepub fn requirepackage_line(&self, engine: Engine) -> Option<String>
pub fn requirepackage_line(&self, engine: Engine) -> Option<String>
The line as a style file writes it under engine,
\RequirePackage[opts]{package} without a trailing newline, or None
where nothing requests the package under it.
Trait Implementations§
Source§impl Clone for PackageRequest
impl Clone for PackageRequest
Source§impl Debug for PackageRequest
impl Debug for PackageRequest
impl Eq for PackageRequest
Source§impl PartialEq for PackageRequest
impl PartialEq for PackageRequest
impl StructuralPartialEq for PackageRequest
Auto Trait Implementations§
impl Forget for PackageRequest
impl Freeze for PackageRequestwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Name>: Freeze,
impl Move for PackageRequest
impl RefUnwindSafe for PackageRequest
impl Send for PackageRequest
impl Sync for PackageRequest
impl Unpin for PackageRequest
impl UnsafeUnpin for PackageRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
impl UnwindSafe for PackageRequest
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