pub struct StandardEditPolicy;Expand description
The default edit policy: leaving the editor commits a valid draft and cancels an invalid one; a draft is kept when the store changes the cell, and the conflict shows; an edited row that leaves the shown lines cancels the edit; an accepted value waits 5 s for the store; an error mark stays until the next edit.
Trait Implementations§
Source§impl Clone for StandardEditPolicy
impl Clone for StandardEditPolicy
Source§fn clone(&self) -> StandardEditPolicy
fn clone(&self) -> StandardEditPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StandardEditPolicy
impl Debug for StandardEditPolicy
Source§impl Default for StandardEditPolicy
impl Default for StandardEditPolicy
Source§fn default() -> StandardEditPolicy
fn default() -> StandardEditPolicy
Returns the “default value” for a type. Read more
Source§impl EditPolicy for StandardEditPolicy
impl EditPolicy for StandardEditPolicy
Source§fn on_blur(&self, context: &EditPolicyContext<'_>) -> EditEnd
fn on_blur(&self, context: &EditPolicyContext<'_>) -> EditEnd
The focus left an open editor, or a press landed outside it.
Source§fn on_value_change(&self, _: &EditPolicyContext<'_>) -> DraftAction
fn on_value_change(&self, _: &EditPolicyContext<'_>) -> DraftAction
The edited cell’s value changed in the store.
The edited row left the shown lines without a user action: a
filter, a collapsed group.
Source§fn commit_unchanged(&self) -> bool
fn commit_unchanged(&self) -> bool
Returns true if a commit equal to the value the edit started from
still emits
EditCommit. Default: no, the editor closes with
EditCancel { reason: Unchanged }.Source§fn settle_timeout(&self) -> Duration
fn settle_timeout(&self) -> Duration
How long an accepted value is shown while the store does not have it
yet. Default: 5 s.
Source§fn error_mark_timeout(&self) -> Option<Duration>
fn error_mark_timeout(&self) -> Option<Duration>
How long the error mark of a failed commit stays;
None (the
default): until the cell is edited again or
LiveGridState::clear_edit_error.impl Copy for StandardEditPolicy
Auto Trait Implementations§
impl Freeze for StandardEditPolicy
impl RefUnwindSafe for StandardEditPolicy
impl Send for StandardEditPolicy
impl Sync for StandardEditPolicy
impl Unpin for StandardEditPolicy
impl UnsafeUnpin for StandardEditPolicy
impl UnwindSafe for StandardEditPolicy
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().