Struct undo::HistoryBuilder

source ·
pub struct HistoryBuilder<R> { /* private fields */ }
Expand description

Builder for a History.

Examples

let history = History::builder()
    .capacity(100)
    .limit(100)
    .saved(false)
    .default();

Implementations§

Sets the specified capacity for the history.

Sets the limit for the history.

Panics

Panics if limit is 0.

Sets if the receiver is initially in a saved state. By default the receiver is in a saved state.

Decides how the signal should be handled when the state changes. By default the history does not handle any signals.

Builds the history.

Creates the history with a default receiver.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.