Trait former::FormerDefinition

source ·
pub trait FormerDefinition: Sized {
    type Types: FormerDefinitionTypes<Storage = Self::Storage, Formed = Self::Formed, Context = Self::Context> + FormerMutator;
    type End: FormingEnd<Self::Types>;
    type Storage: Default;
    type Formed;
    type Context;
}
Expand description

Expands on FormerDefinitionTypes by incorporating an ending mechanism for the formation process. This trait connects the formation types with a specific endpoint, defining how the formation process concludes, including any necessary transformations or validations.

Required Associated Types§

source

type Types: FormerDefinitionTypes<Storage = Self::Storage, Formed = Self::Formed, Context = Self::Context> + FormerMutator

Encapsulates the types related to the formation process including any mutators.

source

type End: FormingEnd<Self::Types>

Defines the ending condition or operation of the formation process.

source

type Storage: Default

The storage type used during the formation.

source

type Formed

The type of the entity being formed. It is generally the structure for which the Former is derived, representing the fully formed state of the entity. However, it can differ if a custom FormingEnd or a different Formed type is defined to handle specific forming logic or requirements.

source

type Context

The context used during the formation process.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<E, Context, Formed, End> FormerDefinition for BTreeSetDefinition<E, Context, Formed, End>
where End: FormingEnd<BTreeSetDefinitionTypes<E, Context, Formed>>,

§

type Storage = BTreeSet<E>

§

type Context = Context

§

type Formed = Formed

§

type Types = BTreeSetDefinitionTypes<E, Context, Formed>

§

type End = End

source§

impl<E, Context, Formed, End> FormerDefinition for BinaryHeapDefinition<E, Context, Formed, End>
where E: Ord, End: FormingEnd<BinaryHeapDefinitionTypes<E, Context, Formed>>,

§

type Storage = BinaryHeap<E>

§

type Context = Context

§

type Formed = Formed

§

type Types = BinaryHeapDefinitionTypes<E, Context, Formed>

§

type End = End

source§

impl<E, Context, Formed, End> FormerDefinition for LinkedListDefinition<E, Context, Formed, End>
where End: FormingEnd<LinkedListDefinitionTypes<E, Context, Formed>>,

§

type Storage = LinkedList<E>

§

type Context = Context

§

type Formed = Formed

§

type Types = LinkedListDefinitionTypes<E, Context, Formed>

§

type End = End

source§

impl<E, Context, Formed, End> FormerDefinition for VecDequeDefinition<E, Context, Formed, End>
where End: FormingEnd<VecDequeDefinitionTypes<E, Context, Formed>>,

§

type Storage = VecDeque<E>

§

type Context = Context

§

type Formed = Formed

§

type Types = VecDequeDefinitionTypes<E, Context, Formed>

§

type End = End

source§

impl<E, Context, Formed, End> FormerDefinition for VectorDefinition<E, Context, Formed, End>
where End: FormingEnd<VectorDefinitionTypes<E, Context, Formed>>,

§

type Storage = Vec<E>

§

type Context = Context

§

type Formed = Formed

§

type Types = VectorDefinitionTypes<E, Context, Formed>

§

type End = End

source§

impl<K, Context, Formed, End> FormerDefinition for HashSetDefinition<K, Context, Formed, End>
where K: Eq + Hash, End: FormingEnd<HashSetDefinitionTypes<K, Context, Formed>>,

§

type Storage = HashSet<K>

§

type Formed = Formed

§

type Context = Context

§

type Types = HashSetDefinitionTypes<K, Context, Formed>

§

type End = End

source§

impl<K, E, Context, Formed, End> FormerDefinition for BTreeMapDefinition<K, E, Context, Formed, End>
where K: Ord, End: FormingEnd<BTreeMapDefinitionTypes<K, E, Context, Formed>>,

§

type Storage = BTreeMap<K, E>

§

type Formed = Formed

§

type Context = Context

§

type Types = BTreeMapDefinitionTypes<K, E, Context, Formed>

§

type End = End

source§

impl<K, E, Context, Formed, End> FormerDefinition for HashMapDefinition<K, E, Context, Formed, End>
where K: Eq + Hash, End: FormingEnd<HashMapDefinitionTypes<K, E, Context, Formed>>,

§

type Storage = HashMap<K, E>

§

type Formed = Formed

§

type Context = Context

§

type Types = HashMapDefinitionTypes<K, E, Context, Formed>

§

type End = End