pub struct NavigationItem<T, D, M, R>
where T: AsRef<str>, D: AsRef<str>, M: AsRef<str>,
{ /* private fields */ }

Implementations§

source§

impl<T, R> NavigationItem<T, &'static str, &'static str, R>
where T: AsRef<str>,

source

pub fn new(title: T, value: R) -> Self

source§

impl<T, D, M, R> NavigationItem<T, D, M, R>
where T: AsRef<str>, D: AsRef<str>, M: AsRef<str>,

source

pub fn with_marker<M2: AsRef<str>>( self, marker: M2 ) -> NavigationItem<T, D, M2, R>

source

pub fn with_detail_text<D2: AsRef<str>>( self, details: D2 ) -> NavigationItem<T, D2, M, R>

Trait Implementations§

source§

impl<T, D, M, R> MenuItem<R> for NavigationItem<T, D, M, R>
where T: AsRef<str>, D: AsRef<str>, M: AsRef<str>, R: Copy,

source§

fn interact(&mut self) -> R

source§

fn title(&self) -> &str

source§

fn details(&self) -> &str

source§

fn value(&self) -> &str

source§

fn set_style<C, S, IT, P>(&mut self, style: &MenuStyle<C, S, IT, P, R>)

source§

fn draw_styled<C, S, IT, P, DIS>( &self, style: &MenuStyle<C, S, IT, P, R>, display: &mut DIS ) -> Result<(), DIS::Error>
where C: PixelColor + From<Rgb888>, S: IndicatorStyle, IT: InputAdapterSource<R>, P: SelectionIndicatorController, DIS: DrawTarget<Color = C>,

source§

impl<T, D, M, R> View for NavigationItem<T, D, M, R>
where T: AsRef<str>, D: AsRef<str>, M: AsRef<str>,

source§

fn translate_impl(&mut self, by: Point)

Object-safe version of translate_mut(). Read more
source§

fn bounds(&self) -> Rectangle

Returns the bounding box of the View as a Rectangle
source§

fn size(&self) -> Size

Get the size of a View.
source§

fn translate_mut(&mut self, by: Point) -> &mut Self
where Self: Sized,

Move the origin of an object by a given number of (x, y) pixels, mutating the object in place. Read more
source§

fn translate(self, by: Point) -> Self
where Self: Sized,

Move the origin of an object by a given number of (x, y) pixels, returning a new object. Read more
source§

impl<T, D, M, R> Marker for NavigationItem<T, D, M, R>
where T: AsRef<str>, D: AsRef<str>, M: AsRef<str>,

Auto Trait Implementations§

§

impl<T, D, M, R> RefUnwindSafe for NavigationItem<T, D, M, R>

§

impl<T, D, M, R> Send for NavigationItem<T, D, M, R>
where D: Send, M: Send, R: Send, T: Send,

§

impl<T, D, M, R> Sync for NavigationItem<T, D, M, R>
where D: Sync, M: Sync, R: Sync, T: Sync,

§

impl<T, D, M, R> Unpin for NavigationItem<T, D, M, R>
where D: Unpin, M: Unpin, R: Unpin, T: Unpin,

§

impl<T, D, M, R> UnwindSafe for NavigationItem<T, D, M, R>

Blanket Implementations§

source§

impl<T> Align for T
where T: View,

source§

fn align_to<H, V>(self, reference: &impl View, horizontal: H, vertical: V) -> T

Return the object aligned to an other one using the alignment parameters as rules
source§

fn align_to_mut<H, V>( &mut self, reference: &impl View, horizontal: H, vertical: V ) -> &mut T

Align the object to an other one using the alignment parameters as rules
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> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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<I, R> MenuItemCollection<R> for I
where I: MenuItem<R> + Marker,

source§

fn bounds_of(&self, nth: usize) -> Rectangle

source§

fn interact_with(&mut self, nth: usize) -> R

source§

fn title_of(&self, nth: usize) -> &str

source§

fn details_of(&self, nth: usize) -> &str

source§

fn count(&self) -> usize

source§

fn draw_styled<C, S, IT, P, DIS>( &self, style: &MenuStyle<C, S, IT, P, R>, display: &mut DIS ) -> Result<(), <DIS as DrawTarget>::Error>
where C: PixelColor + From<Rgb888>, S: IndicatorStyle, IT: InputAdapterSource<R>, P: SelectionIndicatorController, DIS: DrawTarget<Color = C>,

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.