ErrorBuilderParent

Trait ErrorBuilderParent 

Source
pub trait ErrorBuilderParent<T> {
    type AfterRecord;

    // Required method
    fn finish_child_builder(
        self,
        child_result: Result<T, AccumulatedError>,
    ) -> Self::AfterRecord;
}
Expand description

Parent builders can have child builders to simulate nested structures.

Required Associated Types§

Source

type AfterRecord

The parent builder after the child builder finished.

Due to the strongly typed nature of most builders it is common that after the final result of the child builder is recorded the parent is turned into another type.

Required Methods§

Source

fn finish_child_builder( self, child_result: Result<T, AccumulatedError>, ) -> Self::AfterRecord

Record the final result of the child builder.

Implementors§

Source§

impl<ChildValue, List> ErrorBuilderParent<ChildValue> for ErrorAccumulator<List>
where List: Append<ChildValue>,

Source§

type AfterRecord = ErrorAccumulator<<List as Append<ChildValue>>::Output>

Source§

impl<Parent, OwnValue, ChildValue, List> ErrorBuilderParent<ChildValue> for StructBuilder<Parent, OwnValue, List>
where List: Append<ChildValue>,

Source§

type AfterRecord = StructBuilder<Parent, OwnValue, <List as Append<ChildValue>>::Output>

Source§

impl<Parent, Value> ErrorBuilderParent<Value> for ArrayBuilder<Parent, Value>

Source§

type AfterRecord = ArrayBuilder<Parent, Value>