pub struct FormState { /* private fields */ }Expand description
Host-form and bulk-tag editor state grouped off the App god-struct.
Holds the add/edit host form, its dirty-check baseline, the bulk-tag
editor, the last-apply snapshot used by u to revert bulk-tag changes
and the pending-discard confirmation flag. Pure state container.
Implementations§
Source§impl FormState
impl FormState
Sourcepub fn request_discard_confirm(&mut self)
pub fn request_discard_confirm(&mut self)
Arm the “Discard changes?” Esc dialog. Called when Esc fires on a form that has unsaved edits relative to its baseline.
Sourcepub fn dismiss_discard_confirm(&mut self)
pub fn dismiss_discard_confirm(&mut self)
Clear the pending discard flag. Called on dialog dismiss, on successful save, and on form close.
Sourcepub fn is_discard_pending(&self) -> bool
pub fn is_discard_pending(&self) -> bool
True when Esc should show the “Discard changes?” dialog instead of closing the form.
pub fn host(&self) -> &HostForm
pub fn host_mut(&mut self) -> &mut HostForm
pub fn host_baseline(&self) -> Option<&FormBaseline>
pub fn set_host_baseline(&mut self, baseline: Option<FormBaseline>)
pub fn take_host_baseline(&mut self) -> Option<FormBaseline>
pub fn bulk_tag_editor(&self) -> &BulkTagEditorState
pub fn bulk_tag_editor_mut(&mut self) -> &mut BulkTagEditorState
pub fn bulk_tag_undo(&self) -> Option<&Vec<(String, Vec<String>)>>
pub fn set_bulk_tag_undo(&mut self, undo: Option<Vec<(String, Vec<String>)>>)
pub fn take_bulk_tag_undo(&mut self) -> Option<Vec<(String, Vec<String>)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FormState
impl RefUnwindSafe for FormState
impl Send for FormState
impl Sync for FormState
impl Unpin for FormState
impl UnsafeUnpin for FormState
impl UnwindSafe for FormState
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> 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