pub enum FirePass {
All,
HooksOnly,
DecosOnly,
}Expand description
Which callbacks a walk over placed geometry (crate::fire_hooks and the
helpers it shares with page_break_core) is allowed to invoke.
Upstream fires both halves in ONE pass, from ops_of_evaled_vert_box_list
(handlePdf.ml:336 for EvVertHookPageBreak, :325 for EvVertFrame’s
deco), and that pass runs per page INSIDE the page loop — page N’s body
callbacks before page N’s own pagepartsf. That ordering is load-bearing:
stdjareport’s \figure is a hook-page-break that pushes the figure
onto a let-mutable list which the page-parts callback drains onto a LATER
page, so a hook that fires after the loop registers into a list nobody
reads again.
This port cannot fire both halves there, because a decoration’s rect needs
the frame’s per-page top/bottom EXTENT, which is only known once the page’s
header and footer are placed and the page is complete. So the walk runs
twice: page_break_core drives a FirePass::HooksOnly pass per column
(upstream’s position, pageBreak.ml:747-748), and the post-run
fire_hooks drives a FirePass::DecosOnly one. Each callback still
fires exactly once.
Variants§
All
One undivided pass — every hook and every decoration. What a
hand-built DocumentValue handed straight to fire_hooks gets.
HooksOnly
hook-page-break closures only. Frame decorations are skipped, but
the walk still descends through frames, tabular cells and graphics
runs, so a hook nested in one of them fires here and nowhere else.
DecosOnly
Frame decorations, GraphicsElem::Destination markers and everything
else the walk records — but not one hook-page-break, which the
preceding FirePass::HooksOnly pass already ran.
Trait Implementations§
impl Copy for FirePass
impl Eq for FirePass
impl StructuralPartialEq for FirePass
Auto Trait Implementations§
impl Freeze for FirePass
impl RefUnwindSafe for FirePass
impl Send for FirePass
impl Sync for FirePass
impl Unpin for FirePass
impl UnsafeUnpin for FirePass
impl UnwindSafe for FirePass
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Copy for Twhere
T: Copy,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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