pub struct FormState<T> {
pub session: T,
pub selection: Vec<String>,
}Expand description
What a step edited through an EditForm keeps while it is edited, as
its editing state (crate::editable::Editable::EditingState): its
session T, and the keys of the visuals selected.
Fields§
§session: T§selection: Vec<String>Implementations§
Source§impl<T: Clone> FormState<T>
impl<T: Clone> FormState<T>
Sourcepub fn handle<'f, A: Clone>(
&self,
args: &A,
event: Event,
form: impl FnOnce(&A, &Self) -> EditForm<'f, A, T>,
canvas: impl FnOnce(Edit<'_, A, T>, &CanvasEvent),
) -> (A, Self)
pub fn handle<'f, A: Clone>( &self, args: &A, event: Event, form: impl FnOnce(&A, &Self) -> EditForm<'f, A, T>, canvas: impl FnOnce(Edit<'_, A, T>, &CanvasEvent), ) -> (A, Self)
The arguments args and this state after event: a field set by
its setter in the form form makes of them as they were, the
selection replaced, and what the pointer or a key did passed to
canvas.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FormState<T>where
T: Freeze,
impl<T> RefUnwindSafe for FormState<T>where
T: RefUnwindSafe,
impl<T> Send for FormState<T>where
T: Send,
impl<T> Sync for FormState<T>where
T: Sync,
impl<T> Unpin for FormState<T>where
T: Unpin,
impl<T> UnsafeUnpin for FormState<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for FormState<T>where
T: UnwindSafe,
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