[−][src]Struct ibuilder::builders::VecBuilder
Builder for the type Vec<T>
.
The type parameters are:
B
: the type of the builder that producesT
T
: the type of the items of the finalVec
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]
T: NewBuildableValue + 'static,
fn apply(
&mut self,
data: Input,
current_fields: &[String]
) -> Result<(), ChooseError>
[src]
&mut self,
data: Input,
current_fields: &[String]
) -> Result<(), ChooseError>
fn get_options(&self, current_fields: &[String]) -> Options
[src]
fn get_subfields(&self, current_fields: &[String]) -> Vec<String>
[src]
fn to_node(&self) -> Node
[src]
fn get_value_any(&self) -> Option<Box<dyn Any>>
[src]
impl<T> Debug for VecBuilder<T> where
T: NewBuildableValue + 'static,
[src]
T: NewBuildableValue + 'static,
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,
T: Unpin,
impl<T> !UnwindSafe for VecBuilder<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,