[][src]Struct redo::RecordBuilder

pub struct RecordBuilder<C: Command> { /* fields omitted */ }

Builder for a record.

Examples

Record::builder()
    .capacity(100)
    .limit(100)
    .saved(false)
    .default()

Methods

impl<C: Command> RecordBuilder<C>[src]

pub fn new() -> RecordBuilder<C>[src]

Returns a builder for a record.

pub fn capacity(self, capacity: usize) -> RecordBuilder<C>[src]

Sets the capacity for the record.

pub fn limit(self, limit: usize) -> RecordBuilder<C>[src]

Sets the limit of the record.

Panics

Panics if limit is 0.

pub fn saved(self, saved: bool) -> RecordBuilder<C>[src]

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

pub fn build(self, target: C::Target) -> Record<C>[src]

Builds the record.

pub fn build_with<F>(self, target: C::Target, slot: F) -> Record<C, F>[src]

Builds the record with the slot.

impl<C: Command> RecordBuilder<C> where
    C::Target: Default
[src]

pub fn default(self) -> Record<C>[src]

Creates the record with a default target.

pub fn default_with<F>(self, slot: F) -> Record<C, F>[src]

Creates the record with a default target.

Trait Implementations

impl<C: Debug + Command> Debug for RecordBuilder<C>[src]

impl<C: PartialEq + Command> PartialEq<RecordBuilder<C>> for RecordBuilder<C>[src]

impl<C: Eq + Command> Eq for RecordBuilder<C>[src]

impl<C: Ord + Command> Ord for RecordBuilder<C>[src]

impl<C: PartialOrd + Command> PartialOrd<RecordBuilder<C>> for RecordBuilder<C>[src]

impl<C: Hash + Command> Hash for RecordBuilder<C>[src]

impl<C: Command> StructuralPartialEq for RecordBuilder<C>[src]

impl<C: Command> StructuralEq for RecordBuilder<C>[src]

impl<C: Clone + Command> Clone for RecordBuilder<C>[src]

impl<C: Command> Default for RecordBuilder<C>[src]

impl<C: Command> Serialize for RecordBuilder<C>[src]

impl<'de, C: Command> Deserialize<'de> for RecordBuilder<C>[src]

Auto Trait Implementations

impl<C> Unpin for RecordBuilder<C> where
    C: Unpin

impl<C> Send for RecordBuilder<C> where
    C: Send

impl<C> Sync for RecordBuilder<C> where
    C: Sync

impl<C> UnwindSafe for RecordBuilder<C> where
    C: UnwindSafe

impl<C> RefUnwindSafe for RecordBuilder<C> where
    C: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]