pub struct Form {
pub title: &'static str,
pub fields: Vec<Field>,
pub cursor: usize,
}Fields§
§title: &'static str§fields: Vec<Field>§cursor: usizeWhich field the caret is on.
Implementations§
Source§impl Form
impl Form
Sourcepub fn new_schedule() -> Self
pub fn new_schedule() -> Self
The fields temporal schedule create needs.
workflow id is the id given to the workflows the schedule starts, not the schedule’s
own id; the server appends the scheduled time to it, so the two are different things
and naming both avoids the guess.
Sourcepub fn next(&mut self)
pub fn next(&mut self)
Move down a field, wrapping. Tab in a form goes forward and stops nowhere.
pub fn previous(&mut self)
pub fn push(&mut self, c: char)
Sourcepub fn backspace(&mut self) -> bool
pub fn backspace(&mut self) -> bool
Delete backwards. Reports whether anything was there, so the caller can decide what an empty backspace means.
Sourcepub fn get(&self, label: &str) -> &str
pub fn get(&self, label: &str) -> &str
The value of a field by label, trimmed. Empty when absent.
Trait Implementations§
impl Eq for Form
impl StructuralPartialEq for Form
Auto Trait Implementations§
impl Freeze for Form
impl RefUnwindSafe for Form
impl Send for Form
impl Sync for Form
impl Unpin for Form
impl UnsafeUnpin for Form
impl UnwindSafe for Form
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