pub enum NavPatch {
Pushed {
title: String,
immersive: bool,
},
Popped,
Title(String),
GuardTop(bool),
}Expand description
Applied to the NAV HOST after a page child is attached / before it is removed; the toolkit animates its native presentation accordingly.
Variants§
Pushed
The just-attached last page child became the top of the stack. immersive marks a
page that keeps the floating transparent chrome on backends with an immersive nav
mode (day-android edge-to-edge today; ignored elsewhere) — unmarked pages get the
standard opaque bar.
Popped
The top page is about to be removed; present its predecessor.
Title(String)
Current top-of-stack title changed.
GuardTop(bool)
The top page has a back guard (Stack::on_back, docs/navigation.md): while true,
the toolkit must NOT auto-pop on a native back gesture/button — instead route it to
Day as Event::NavBack { already_popped: false } so the app’s guard decides. On
backends whose back already routes through Day (AppKit/Qt/XAML/web custom headers)
this is a no-op; iOS disables the swipe, Android holds its callback, GTK sets the
page can-pop=false, ArkUI consumes onBackPressed.