[−][src]Struct undo::HistoryBuilder
Builder for a History.
Examples
History::builder() .capacity(100) .limit(100) .saved(false) .default()
Methods
impl<T> HistoryBuilder<T>
[src]
pub fn new() -> HistoryBuilder<T>
[src]
Returns a builder for a history.
pub fn capacity(self, capacity: usize) -> HistoryBuilder<T>
[src]
Sets the specified capacity for the history.
pub fn limit(self, limit: usize) -> HistoryBuilder<T>
[src]
pub fn saved(self, saved: bool) -> HistoryBuilder<T>
[src]
Sets if the target is initially in a saved state. By default the target is in a saved state.
pub fn connect(self, slot: impl FnMut(Signal) + 'static) -> HistoryBuilder<T>
[src]
Decides how the signal should be handled when the state changes. By default the history does not handle any signals.
pub fn build(self, target: T) -> History<T>
[src]
Builds the history.
impl<T: Default> HistoryBuilder<T>
[src]
Trait Implementations
impl<T> Default for HistoryBuilder<T>
[src]
impl<T: Debug> Debug for HistoryBuilder<T>
[src]
Auto Trait Implementations
impl<T> !Send for HistoryBuilder<T>
impl<T> !Sync for HistoryBuilder<T>
impl<T> Unpin for HistoryBuilder<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for HistoryBuilder<T>
impl<T> !RefUnwindSafe for HistoryBuilder<T>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,