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 capacity for the history.
pub fn limit(self, limit: usize) -> HistoryBuilder<R, C>
[src]
pub fn limit(self, limit: usize) -> HistoryBuilder<R, C>
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. By default the receiver is 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 not handle any signals.
pub fn build(
self,
receiver: impl Into<R>
) -> History<R, C>
[src]
pub fn build(
self,
receiver: impl Into<R>
) -> History<R, C>
Builds 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,