pub trait FormingEnd<Definition: FormerDefinitionTypes> {
// Required method
fn call(
&self,
storage: Definition::Storage,
context: Option<Definition::Context>,
) -> Definition::Formed;
}Expand description
Defines a handler for the end of a subforming process, enabling the return of the original context.
This trait is designed to be flexible, allowing for various end-of-forming behaviors in builder patterns. Implementors can define how to transform or pass through the context during the forming process’s completion.
§Parameters
Storage: The type of the collection being processed.Context: The type of the context that might be altered or returned upon completion.
Required Methods§
Implementors§
impl<Definition> FormingEnd<Definition> for NoEndwhere
Definition: FormerDefinitionTypes,
impl<Definition> FormingEnd<Definition> for ReturnPreformedwhere
Definition::Storage: StoragePreform<Preformed = Definition::Formed>,
Definition: FormerDefinitionTypes,
impl<Definition, F> FormingEnd<Definition> for F
impl<Definition, T> FormingEnd<Definition> for ReturnStoragewhere
Definition: FormerDefinitionTypes<Context = (), Storage = T, Formed = T>,
impl<Definition: FormerDefinitionTypes> FormingEnd<Definition> for FormingEndClosure<Definition>
Available on non-crate feature
no_std or crate feature use_alloc only.