Skip to main content

NavOptions

Struct NavOptions 

Source
pub struct NavOptions<R> { /* private fields */ }
Expand description

How NavController::navigate_with changes the back stack — Android’s NavOptions.

Implementations§

Source§

impl<R> NavOptions<R>

Source

pub fn new() -> Self

Options that change nothing: the route is pushed on top.

Source

pub fn pop_up_to(self, route: R, inclusive: bool) -> Self

Pops the entries above the topmost route before navigating, and that entry too when inclusive — Android’s popUpTo(route) { inclusive }. Nothing is popped when route is not on the back stack.

Source

pub fn launch_single_top(self) -> Self

Does not push the route when it is already on top — Android’s launchSingleTop = true.

Trait Implementations§

Source§

impl<R> Default for NavOptions<R>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<R> Freeze for NavOptions<R>
where Option<(R, bool)>: Freeze,

§

impl<R> RefUnwindSafe for NavOptions<R>
where Option<(R, bool)>: RefUnwindSafe,

§

impl<R> Send for NavOptions<R>
where Option<(R, bool)>: Send,

§

impl<R> Sync for NavOptions<R>
where Option<(R, bool)>: Sync,

§

impl<R> Unpin for NavOptions<R>
where Option<(R, bool)>: Unpin,

§

impl<R> UnsafeUnpin for NavOptions<R>
where Option<(R, bool)>: UnsafeUnpin,

§

impl<R> UnwindSafe for NavOptions<R>
where Option<(R, bool)>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.