pub enum Whatsout {
Document,
Fragment,
Math,
Archive,
}Expand description
Output extraction mode — port of Perl LaTeXML::Util::Pack’s
whatsout option (Pack.pm L320-345). Selects which subtree of the
post-processed document to serialize and ship to the user.
Whatsout::Document— full document, no extraction (default).Whatsout::Fragment— embeddable HTML snippet viaget_embeddable.Whatsout::Math— math subtree (or fallback) viaget_math.Whatsout::Archive— full document, but bundled into a zip bycrate::pack::pack_archive(Pack.pm L326-331 +Pack/Zip.pm::get_archive). Extraction is a no-op; the archiving happens in the binary’s output stage.
Variants§
Implementations§
Source§impl Whatsout
impl Whatsout
Sourcepub fn from_cli(s: &str) -> Option<Self>
pub fn from_cli(s: &str) -> Option<Self>
Parse a CLI string into the matching variant. Returns None for
unrecognized values; callers typically fall back to Document.
Mirrors Perl pack_collection’s string-tag dispatch. Perl matches
archive with /^archive/, so the archive::zip /
archive::zip::perl long forms (Pack/Zip.pm L118-122) also map to
Whatsout::Archive.
Sourcepub fn as_cli(self) -> &'static str
pub fn as_cli(self) -> &'static str
The canonical CLI tag for this variant — round-trips through
Whatsout::from_cli. Used to serialize the mode across a process
boundary (the parallel page-render worker manifest).
Sourcepub fn is_archive(self) -> bool
pub fn is_archive(self) -> bool
Whether this mode bundles the output into a zip archive (Perl
pack_collection whatsout =~ /^archive/). The binary’s output
stage branches on this to call crate::pack::pack_archive.
Sourcepub fn requires_post(self) -> bool
pub fn requires_post(self) -> bool
Whether selecting this mode forces post-processing. Perl
Config.pm L454: any whatsout other than document implies
post = 1 (fragment/math need the extraction stage; archive needs
the full post-processed document to bundle).
Trait Implementations§
impl Copy for Whatsout
impl Eq for Whatsout
impl StructuralPartialEq for Whatsout
Auto Trait Implementations§
impl Freeze for Whatsout
impl RefUnwindSafe for Whatsout
impl Send for Whatsout
impl Sync for Whatsout
impl Unpin for Whatsout
impl UnsafeUnpin for Whatsout
impl UnwindSafe for Whatsout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.