File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,16 @@ use crate::build_tools::py_err;
14
14
// An integer id for the reference
15
15
pub type ReferenceId = usize ;
16
16
17
- /// Definitions for validators or serializers
18
- /// They get indexed by a ReferenceId,
19
- /// which are handed out and managed by DefinitionsBuilder
17
+ /// Definitions are validators and serializers that are
18
+ /// shared by reference.
19
+ /// They come into play whenever there is recursion, e.g.
20
+ /// if you have validators A -> B -> A then A will be shared
21
+ /// by reference so that the SchemaValidator itself can own it.
22
+ /// These primarily get used by DefinitionRefValidator and DefinitionRefSerializer,
23
+ /// other validators / serializers primarily pass them around without interacting with them.
24
+ /// They get indexed by a ReferenceId, which are integer identifiers
25
+ /// that are handed out and managed by DefinitionsBuilder when the Schema{Validator,Serializer}
26
+ /// gets build.
20
27
pub type Definitions < T > = [ T ] ;
21
28
22
29
#[ derive( Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments