[][src]Struct redo::RecordBuilder

pub struct RecordBuilder<R, C> { /* fields omitted */ }

Builder for a record.

Examples

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

Methods

impl<R, C> RecordBuilder<R, C>[src]

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

Returns a builder for a record.

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

Sets the capacity for the record.

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

Sets the limit of the record.

Panics

Panics if limit is 0.

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

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

pub fn build(self, receiver: impl Into<R>) -> Record<R, C>[src]

Builds the record.

pub fn build_with<F>(self, receiver: impl Into<R>, slot: F) -> Record<R, C, F>[src]

Builds the record with the slot.

impl<R: Default, C> RecordBuilder<R, C>[src]

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

Creates the record with a default receiver.

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

Creates the record with a default receiver.

Trait Implementations

impl<R: Clone, C: Clone> Clone for RecordBuilder<R, C>[src]

impl<R, C> Default for RecordBuilder<R, C>[src]

impl<R: Eq, C: Eq> Eq for RecordBuilder<R, C>[src]

impl<R: Ord, C: Ord> Ord for RecordBuilder<R, C>[src]

impl<R: PartialEq, C: PartialEq> PartialEq<RecordBuilder<R, C>> for RecordBuilder<R, C>[src]

impl<R: PartialOrd, C: PartialOrd> PartialOrd<RecordBuilder<R, C>> for RecordBuilder<R, C>[src]

impl<R: Debug, C: Debug> Debug for RecordBuilder<R, C>[src]

impl<R: Hash, C: Hash> Hash for RecordBuilder<R, C>[src]

impl<R, C> Serialize for RecordBuilder<R, C>[src]

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> 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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]