Skip to content

Commit

Permalink
former : solve problem with container interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed May 7, 2024
1 parent 8a2c07c commit 58445e6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/core/former/src/hash_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ where

#[ derive( Debug, Default ) ]
pub struct HashMapDefinition< K, E, Context = (), Formed = HashMap< K, E >, End = ReturnStorage >
where
K : ::core::cmp::Eq + ::core::hash::Hash,
End : FormingEnd< HashMapDefinitionTypes< K, E, Context, Formed > >,
{
_phantom : core::marker::PhantomData< ( K, E, Context, Formed, End ) >,
}
Expand Down
3 changes: 3 additions & 0 deletions module/core/former/src/hash_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ where

#[ derive( Debug, Default ) ]
pub struct HashSetDefinition< K, Context = (), Formed = HashSet< K >, End = ReturnStorage >
where
End : FormingEnd< HashSetDefinitionTypes< K, Context, Formed > >,
K : ::core::cmp::Eq + ::core::hash::Hash,
{
_phantom : core::marker::PhantomData< ( K, Context, Formed, End ) >,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ where
Context = Struct1Former< Definition >,
End = Struct1FormerAssignHashmap1End< Definition >,
>,
Struct1FormerAssignHashmap1End< Definition > : former::FormingEnd
<
< collection_tools::HashMap< String, String > as former::EntityToDefinitionTypes< Self, Self > >::Types
>,
{
Former2::former_begin( None, Some( self ), Struct1FormerAssignHashmap1End::< Definition >::default() )
}
Expand All @@ -458,6 +462,10 @@ where
Context = Struct1Former< Definition >,
End = Struct1FormerAssignHashmap1End< Definition >,
>,
Struct1FormerAssignHashmap1End< Definition > : former::FormingEnd
<
< collection_tools::HashMap< String, String > as former::EntityToDefinitionTypes< Self, Self > >::Types
>,
{
self._hashmap_1_assign::< former::ContainerSubformer::
<
Expand All @@ -481,6 +489,11 @@ where
Context = Struct1Former< Definition >,
End = Struct1FormerAssignHashset1End< Definition >,
>,
Struct1FormerAssignHashset1End< Definition > : former::FormingEnd
<
< collection_tools::HashSet< String > as former::EntityToDefinitionTypes< Self, Self > >::Types
>,

// Struct1FormerAssignHashset1End< Definition > : former::FormingEnd
// <
// former::HashSetDefinitionTypes< String, Struct1Former< Definition >, Struct1Former< Definition > >
Expand All @@ -502,6 +515,11 @@ where
Context = Struct1Former< Definition >,
End = Struct1FormerAssignHashset1End< Definition >,
>,
Struct1FormerAssignHashset1End< Definition > : former::FormingEnd
<
< collection_tools::HashSet< String > as former::EntityToDefinitionTypes< Self, Self > >::Types
>,

// Struct1FormerAssignHashset1End< Definition > : former::FormingEnd
// <
// former::HashSetDefinitionTypes< String, Struct1Former< Definition >, Struct1Former< Definition > >,
Expand Down

0 comments on commit 58445e6

Please sign in to comment.