pub struct Settings {
pub max_undos: usize,
pub stable_time: f32,
pub auto_save_interval: f32,
}
Fields§
§max_undos: usize
Maximum number of undos. If your state is resource intensive, you should keep this low.
Default: 100
stable_time: f32
When that state hasn’t changed for this many seconds, create a new undo point (if one is needed).
Default value: 1.0
seconds.
auto_save_interval: f32
If the state is changing so often that we never get to stable_time
,
then still create a save point every auto_save_interval
seconds,
so we have something to undo to.
Default value: 30
seconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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