Skip to main content

NavigationScope

Struct NavigationScope 

Source
pub struct NavigationScope<'a> { /* private fields */ }
Expand description

A Navigation and its builder.

Implementations§

Source§

impl<'a> NavigationScope<'a>

Source

pub fn compact(self, compact: CompactNavigation) -> Self

What the destinations become in a compact window.

Without it the design system answers, which is a bottom bar on most of them. An application whose own reference draws a compact window differently says so here: Sidebar puts the sidebar away behind a toggle on every design system, and None leaves the destinations off a compact window so the screen can reach them its own way. Medium and Expanded windows keep the design system’s rail and drawer whatever this says, and the screen still never asks how wide the window is.

Source

pub fn head(self, head: impl FnOnce() + 'a) -> Self

What sits above the destinations in a strip.

Source

pub fn foot(self, foot: impl FnOnce() + 'a) -> Self

What sits below them.

Source§

impl<'a> NavigationScope<'a>

Source

pub fn modifier(self, modifier: Modifier) -> Self

What sits around it. Compose’s modifier parameter.

Source§

impl<'a> NavigationScope<'a>

Source

pub fn content(self, content: impl FnOnce())

Composes this widget with content as its children.

Trait Implementations§

Source§

impl<'a> Drop for NavigationScope<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for NavigationScope<'a>

§

impl<'a> !Send for NavigationScope<'a>

§

impl<'a> !Sync for NavigationScope<'a>

§

impl<'a> !UnwindSafe for NavigationScope<'a>

§

impl<'a> Forget for NavigationScope<'a>

§

impl<'a> Freeze for NavigationScope<'a>

§

impl<'a> Move for NavigationScope<'a>

§

impl<'a> Unpin for NavigationScope<'a>

§

impl<'a> UnsafeUnpin for NavigationScope<'a>

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, 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.