[−][src]Struct prototty_menu::MenuInstance
Methods
impl<T: Clone> MenuInstance<T>
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn new(items: Vec<T>) -> Result<Self, InitialIndexOutOfBounds>
[src]
pub fn up(&mut self)
[src]
pub fn down(&mut self)
[src]
pub fn set_index(&mut self, index: usize)
[src]
pub fn selected(&self) -> T
[src]
pub fn choose<M>(&mut self, view: &M, input: Input) -> Option<T> where
M: MenuIndexFromScreenCoord,
[src]
M: MenuIndexFromScreenCoord,
pub fn choose_or_escape<M>(
&mut self,
view: &M,
input: Input
) -> Option<Result<T, Escape>> where
M: MenuIndexFromScreenCoord,
[src]
&mut self,
view: &M,
input: Input
) -> Option<Result<T, Escape>> where
M: MenuIndexFromScreenCoord,
pub fn choose_or_quit<M>(
&mut self,
view: &M,
input: Input
) -> Option<Result<T, Quit>> where
M: MenuIndexFromScreenCoord,
[src]
&mut self,
view: &M,
input: Input
) -> Option<Result<T, Quit>> where
M: MenuIndexFromScreenCoord,
pub fn choose_or_cancel<M>(
&mut self,
view: &M,
input: Input
) -> Option<Result<T, Cancel>> where
M: MenuIndexFromScreenCoord,
[src]
&mut self,
view: &M,
input: Input
) -> Option<Result<T, Cancel>> where
M: MenuIndexFromScreenCoord,
pub fn into_just_choose(self) -> MenuInstanceJustChoose<T>
[src]
pub fn into_choose_or_escape(self) -> MenuInstanceChooseOrEscape<T>
[src]
pub fn into_choose_or_quit(self) -> MenuInstanceChooseOrQuit<T>
[src]
pub fn into_choose_or_cancel(self) -> MenuInstanceChooseOrCancel<T>
[src]
Trait Implementations
impl<T: Clone> Clone for MenuInstance<T>
[src]
fn clone(&self) -> MenuInstance<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + Clone> Debug for MenuInstance<T>
[src]
impl<'a, T, E> View<&'a MenuInstance<T>> for MenuInstanceView<E> where
T: Clone,
E: MenuEntryView<T>,
[src]
T: Clone,
E: MenuEntryView<T>,
fn view<F: Frame, C: ColModify>(
&mut self,
menu_instance: &'a MenuInstance<T>,
context: ViewContext<C>,
frame: &mut F
)
[src]
&mut self,
menu_instance: &'a MenuInstance<T>,
context: ViewContext<C>,
frame: &mut F
)
fn size<C>(&mut self, data: T, context: ViewContext<C>) -> Size where
C: ColModify,
[src]
C: ColModify,
fn view_size<F, C>(
&mut self,
data: T,
context: ViewContext<C>,
frame: &mut F
) -> Size where
C: ColModify,
F: Frame,
[src]
&mut self,
data: T,
context: ViewContext<C>,
frame: &mut F
) -> Size where
C: ColModify,
F: Frame,
Auto Trait Implementations
impl<T> RefUnwindSafe for MenuInstance<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for MenuInstance<T> where
T: Send,
T: Send,
impl<T> Sync for MenuInstance<T> where
T: Sync,
T: Sync,
impl<T> Unpin for MenuInstance<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for MenuInstance<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,