Struct redo::HistoryBuilder [−][src]
pub struct HistoryBuilder<R, C: Command<R>> { /* fields omitted */ }
Builder for a history.
Methods
impl<R, C: Command<R>> HistoryBuilder<R, C>
[src]
impl<R, C: Command<R>> HistoryBuilder<R, C>
pub fn capacity(self, capacity: usize) -> HistoryBuilder<R, C>
[src]
pub fn capacity(self, capacity: usize) -> HistoryBuilder<R, C>
Sets the specified capacity for the history.
pub fn limit(self, limit: usize) -> HistoryBuilder<R, C>
[src]
pub fn limit(self, limit: usize) -> HistoryBuilder<R, C>
Sets the limit
for the history.
If this limit is reached it will start popping of commands at the beginning of the history when pushing new commands on to the stack. No limit is set by default which means it may grow indefinitely.
pub fn saved(self, saved: bool) -> HistoryBuilder<R, C>
[src]
pub fn saved(self, saved: bool) -> HistoryBuilder<R, C>
Sets if the receiver is initially in a saved state.
pub fn signal(
self,
f: impl FnMut(Signal) + Send + Sync + 'static
) -> HistoryBuilder<R, C>
[src]
pub fn signal(
self,
f: impl FnMut(Signal) + Send + Sync + 'static
) -> HistoryBuilder<R, C>
Decides how the signal should be handled when the state changes. By default the history does nothing.
pub fn build(
self,
receiver: impl Into<R>
) -> History<R, C>
[src]
pub fn build(
self,
receiver: impl Into<R>
) -> History<R, C>
Creates the history.
impl<R: Default, C: Command<R>> HistoryBuilder<R, C>
[src]
impl<R: Default, C: Command<R>> HistoryBuilder<R, C>
Trait Implementations
Auto Trait Implementations
impl<R, C> Send for HistoryBuilder<R, C> where
C: Send,
R: Send,
impl<R, C> Send for HistoryBuilder<R, C> where
C: Send,
R: Send,
impl<R, C> Sync for HistoryBuilder<R, C> where
C: Sync,
R: Sync,
impl<R, C> Sync for HistoryBuilder<R, C> where
C: Sync,
R: Sync,