pub struct Modal { /* private fields */ }Implementations§
Source§impl Modal
impl Modal
pub fn new(id: u64, title: impl Into<Cow<'static, str>>) -> Self
pub fn alert( id: u64, title: impl Into<Cow<'static, str>>, lines: impl IntoIterator<Item = Line<'static>>, ) -> Self
pub fn text(self, lines: impl IntoIterator<Item = Line<'static>>) -> Self
pub fn list(self, choices: impl IntoIterator<Item = Choice>) -> Self
pub fn list_rows( self, choices: impl IntoIterator<Item = Choice>, rows: u16, ) -> Self
pub fn field(self, field: Field) -> Self
pub fn filter(self, field: usize, list: usize) -> Self
pub fn status(self, text: impl Into<Cow<'static, str>>, tone: Tone) -> Self
pub fn width(self, cells: u16) -> Self
pub fn hints(self, hints: impl IntoIterator<Item = Hint<'static>>) -> Self
pub fn cancel_keys(self, keys: &'static [Key]) -> Self
pub fn close_keys(self, keys: &'static [Key]) -> Self
pub fn focus(self, part: usize) -> Self
pub fn id(&self) -> u64
pub fn focused(&self) -> usize
pub fn set_status(&mut self, status: Option<(Cow<'static, str>, Tone)>)
pub fn set_text( &mut self, part: usize, lines: impl IntoIterator<Item = Line<'static>>, ) -> bool
pub fn set_choices( &mut self, part: usize, choices: impl IntoIterator<Item = Choice>, ) -> bool
pub fn choice(&self, part: usize) -> Option<usize>
pub fn value(&self, part: usize) -> Option<&str>
pub fn input_mut(&mut self, part: usize) -> Option<&mut Input>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Modal
impl RefUnwindSafe for Modal
impl Send for Modal
impl Sync for Modal
impl Unpin for Modal
impl UnsafeUnpin for Modal
impl UnwindSafe for Modal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more