[−][src]Struct undo::RecordBuilder
Builder for a record.
Examples
let record = Record::builder() .capacity(100) .limit(100) .saved(false) .default();
Methods
impl<R> RecordBuilder<R>
[src]
pub fn capacity(self, capacity: usize) -> RecordBuilder<R>
[src]
Sets the capacity for the record.
pub fn limit(self, limit: usize) -> RecordBuilder<R>
[src]
pub fn saved(self, saved: bool) -> RecordBuilder<R>
[src]
Sets if the receiver is initially in a saved state. By default the receiver is in a saved state.
pub fn connect(
self,
f: impl FnMut(Signal) + Send + Sync + 'static
) -> RecordBuilder<R>
[src]
self,
f: impl FnMut(Signal) + Send + Sync + 'static
) -> RecordBuilder<R>
Decides how the signal should be handled when the state changes. By default the record does not handle any signals.
pub fn build(
self,
receiver: impl Into<R>
) -> Record<R>
[src]
self,
receiver: impl Into<R>
) -> Record<R>
Builds the record.
impl<R: Default> RecordBuilder<R>
[src]
Trait Implementations
Auto Trait Implementations
impl<R> Send for RecordBuilder<R> where
R: Send,
R: Send,
impl<R> Sync for RecordBuilder<R> where
R: Sync,
R: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,