pub struct NavigationStack<T, F> { /* private fields */ }Expand description
A stack of navigation views.
Implementations§
Sourcepub fn with(path: NavigationPath<T>, root: impl View) -> Self
pub fn with(path: NavigationPath<T>, root: impl View) -> Self
Creates a new navigation stack with the specified navigation path and root view.
§Arguments
path- The navigation path representing the current stackroot- The root view of the navigation stack
Sourcepub fn destination<F>(
self,
destination: F,
) -> NavigationStack<NavigationPath<T>, F>where
F: 'static + Fn(T) -> NavigationView,
pub fn destination<F>(
self,
destination: F,
) -> NavigationStack<NavigationPath<T>, F>where
F: 'static + Fn(T) -> NavigationView,
Sets the destination builder for the navigation stack.
§Arguments
destination- A function that creates aNavigationViewfrom a path component
Trait Implementations§
Source§fn stretch_axis(&self) -> StretchAxis
fn stretch_axis(&self) -> StretchAxis
Which axis (or axes) this view stretches to fill available space.
Auto Trait Implementations§
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more