[][src]Struct ibuilder::builders::VecBuilder

pub struct VecBuilder<T> where
    T: NewBuildableValue + 'static, 
{ /* fields omitted */ }

Builder for the type Vec<T>.

The type parameters are:

  • B: the type of the builder that produces T
  • T: the type of the items of the final Vec

The state machine that this builder implements is a bit complex since it has to handle insertions, deletions and updates and it looks like this:

                |
                v
           +-------------+    __new    +-------------+  <B> specific
 +-------> |  empty      | ----------> | not empty   | ------>>>
 |         |  main       |             | edit        |
 |         +-------------+             +-------------+
 |                                         ^    |
 |                                         |    |
 |         +-------------+  index / __new  |    | __back
 +-------> |  not empty  | ----------------+    |
 |         |  main       | <--------------------+
 | index   +-------------+
 |            ^    |
 |     __back |    | __remove
 |            |    v
 |         +-------------+
 +-------- |  not empty  |
           |  remove     |
           +-------------+

When __new is applied a new item is pushed at the back of the Vec and when __new is to be considered as an index it refers to the last element of the Vec.

Trait Implementations

impl<T> BuildableValue for VecBuilder<T> where
    T: NewBuildableValue + 'static, 
[src]

impl<T> Debug for VecBuilder<T> where
    T: NewBuildableValue + 'static, 
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for VecBuilder<T>

impl<T> !Send for VecBuilder<T>

impl<T> !Sync for VecBuilder<T>

impl<T> Unpin for VecBuilder<T> where
    T: Unpin

impl<T> !UnwindSafe for VecBuilder<T>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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> 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.