| {"examples":[{"ast":{"items":[{"use":{"tree":{"path":{"ident":"crate","tree":{"path":{"ident":"project_algebra","tree":{"group":[{"ident":"Feature"},{"ident":"Project"}]}}}}}}},{"use":{"tree":{"path":{"ident":"std","tree":{"path":{"ident":"collections","tree":{"ident":"HashMap"}}}}}}},{"struct":{"attrs":[{"meta":{"name_value":{"path":{"segments":[{"ident":"doc"}]},"value":{"lit":{"str":"\" Reflection information for a declaration in code, linking its symbolic name to algebraic value.\""}}}},"style":"outer"},{"meta":{"list":{"delimiter":"paren","path":{"segments":[{"ident":"derive"}]},"tokens":[{"ident":"Debug"}]}},"style":"outer"}],"fields":{"named":[{"colon_token":true,"ident":"name","ty":{"path":{"segments":[{"ident":"String"}]}},"vis":"pub"},{"colon_token":true,"ident":"features","ty":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"Feature"}]}}}]}},"ident":"Vec"}]}},"vis":"pub"},{"colon_token":true,"ident":"numeric_signature","ty":{"path":{"segments":[{"ident":"u64"}]}},"vis":"pub"}]},"ident":"DeclarationReflection","vis":"pub"}},{"impl":{"items":[{"fn":{"ident":"new","inputs":[{"typed":{"pat":{"ident":{"ident":"name"}},"ty":{"impl_trait":{"bounds":[{"trait":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"String"}]}}}]}},"ident":"Into"}]}}}]}}}},{"typed":{"pat":{"ident":{"ident":"features"}},"ty":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"Feature"}]}}}]}},"ident":"Vec"}]}}}}],"output":{"path":{"segments":[{"ident":"Self"}]}},"stmts":[{"let":{"init":{"expr":{"method_call":{"args":[],"method":"product","receiver":{"method_call":{"args":[{"closure":{"body":{"method_call":{"args":[],"method":"prime","receiver":{"path":{"segments":[{"ident":"f"}]}}}},"inputs":[{"ident":{"ident":"f"}}],"output":null}}],"method":"map","receiver":{"method_call":{"args":[],"method":"iter","receiver":{"path":{"segments":[{"ident":"features"}]}}}}}}}}},"pat":{"ident":{"ident":"numeric_signature"}}}},{"expr":[{"struct":{"fields":[{"colon_token":true,"expr":{"method_call":{"args":[],"method":"into","receiver":{"path":{"segments":[{"ident":"name"}]}}}},"ident":"name"},{"expr":{"path":{"segments":[{"ident":"features"}]}},"ident":"features"},{"expr":{"path":{"segments":[{"ident":"numeric_signature"}]}},"ident":"numeric_signature"}],"path":{"segments":[{"ident":"DeclarationReflection"}]}}},false]}],"vis":"pub"}}],"self_ty":{"path":{"segments":[{"ident":"DeclarationReflection"}]}}}},{"struct":{"attrs":[{"meta":{"name_value":{"path":{"segments":[{"ident":"doc"}]},"value":{"lit":{"str":"\" Holds all reflected declarations for the project\""}}}},"style":"outer"},{"meta":{"list":{"delimiter":"paren","path":{"segments":[{"ident":"derive"}]},"tokens":[{"ident":"Debug"}]}},"style":"outer"}],"fields":{"named":[{"colon_token":true,"ident":"declarations","ty":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"String"}]}}},{"type":{"path":{"segments":[{"ident":"DeclarationReflection"}]}}}]}},"ident":"HashMap"}]}},"vis":"pub"}]},"ident":"ProjectReflection","vis":"pub"}},{"impl":{"items":[{"fn":{"ident":"new","inputs":[],"output":{"path":{"segments":[{"ident":"Self"}]}},"stmts":[{"expr":[{"struct":{"fields":[{"colon_token":true,"expr":{"call":{"args":[],"func":{"path":{"segments":[{"ident":"HashMap"},{"ident":"new"}]}}}},"ident":"declarations"}],"path":{"segments":[{"ident":"ProjectReflection"}]}}},false]}],"vis":"pub"}},{"fn":{"attrs":[{"meta":{"name_value":{"path":{"segments":[{"ident":"doc"}]},"value":{"lit":{"str":"\" Add a new reflected declaration\""}}}},"style":"outer"}],"ident":"add_declaration","inputs":[{"receiver":{"mut":true,"ref":true,"ty":{"reference":{"elem":{"path":{"segments":[{"ident":"Self"}]}},"mut":true}}}},{"typed":{"pat":{"ident":{"ident":"name"}},"ty":{"impl_trait":{"bounds":[{"trait":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"String"}]}}}]}},"ident":"Into"}]}}}]}}}},{"typed":{"pat":{"ident":{"ident":"features"}},"ty":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"Feature"}]}}}]}},"ident":"Vec"}]}}}}],"output":null,"stmts":[{"let":{"init":{"expr":{"call":{"args":[{"path":{"segments":[{"ident":"name"}]}},{"path":{"segments":[{"ident":"features"}]}}],"func":{"path":{"segments":[{"ident":"DeclarationReflection"},{"ident":"new"}]}}}}},"pat":{"ident":{"ident":"decl"}}}},{"expr":[{"method_call":{"args":[{"method_call":{"args":[],"method":"clone","receiver":{"field":{"base":{"path":{"segments":[{"ident":"decl"}]}},"ident":"name"}}}},{"path":{"segments":[{"ident":"decl"}]}}],"method":"insert","receiver":{"field":{"base":{"path":{"segments":[{"ident":"self"}]}},"ident":"declarations"}}}},true]}],"vis":"pub"}},{"fn":{"attrs":[{"meta":{"name_value":{"path":{"segments":[{"ident":"doc"}]},"value":{"lit":{"str":"\" Find a declaration\\'s numeric signature by name\""}}}},"style":"outer"}],"ident":"signature_for","inputs":[{"receiver":{"ref":true,"ty":{"reference":{"elem":{"path":{"segments":[{"ident":"Self"}]}}}}}},{"typed":{"pat":{"ident":{"ident":"name"}},"ty":{"reference":{"elem":{"path":{"segments":[{"ident":"str"}]}}}}}}],"output":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"path":{"segments":[{"ident":"u64"}]}}}]}},"ident":"Option"}]}},"stmts":[{"expr":[{"method_call":{"args":[{"closure":{"body":{"field":{"base":{"path":{"segments":[{"ident":"d"}]}},"ident":"numeric_signature"}},"inputs":[{"ident":{"ident":"d"}}],"output":null}}],"method":"map","receiver":{"method_call":{"args":[{"path":{"segments":[{"ident":"name"}]}}],"method":"get","receiver":{"field":{"base":{"path":{"segments":[{"ident":"self"}]}},"ident":"declarations"}}}}}},false]}],"vis":"pub"}},{"fn":{"attrs":[{"meta":{"name_value":{"path":{"segments":[{"ident":"doc"}]},"value":{"lit":{"str":"\" List all declarations and their algebraic signatures\""}}}},"style":"outer"}],"ident":"list_declarations","inputs":[{"receiver":{"ref":true,"ty":{"reference":{"elem":{"path":{"segments":[{"ident":"Self"}]}}}}}}],"output":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"tuple":{"elems":[{"reference":{"elem":{"path":{"segments":[{"ident":"String"}]}}}},{"path":{"segments":[{"ident":"u64"}]}}]}}}]}},"ident":"Vec"}]}},"stmts":[{"expr":[{"method_call":{"args":[],"method":"collect","receiver":{"method_call":{"args":[{"closure":{"body":{"tuple":{"elems":[{"path":{"segments":[{"ident":"k"}]}},{"field":{"base":{"path":{"segments":[{"ident":"v"}]}},"ident":"numeric_signature"}}]}},"inputs":[{"tuple":{"elems":[{"ident":{"ident":"k"}},{"ident":{"ident":"v"}}]}}],"output":null}}],"method":"map","receiver":{"method_call":{"args":[],"method":"iter","receiver":{"field":{"base":{"path":{"segments":[{"ident":"self"}]}},"ident":"declarations"}}}}}}}},false]}],"vis":"pub"}},{"fn":{"attrs":[{"meta":{"name_value":{"path":{"segments":[{"ident":"doc"}]},"value":{"lit":{"str":"\" Find declaration(s) by numeric signature\""}}}},"style":"outer"}],"ident":"declarations_by_signature","inputs":[{"receiver":{"ref":true,"ty":{"reference":{"elem":{"path":{"segments":[{"ident":"Self"}]}}}}}},{"typed":{"pat":{"ident":{"ident":"signature"}},"ty":{"path":{"segments":[{"ident":"u64"}]}}}}],"output":{"path":{"segments":[{"arguments":{"angle_bracketed":{"args":[{"type":{"reference":{"elem":{"path":{"segments":[{"ident":"DeclarationReflection"}]}}}}}]}},"ident":"Vec"}]}},"stmts":[{"expr":[{"method_call":{"args":[],"method":"collect","receiver":{"method_call":{"args":[{"closure":{"body":{"binary":{"left":{"field":{"base":{"path":{"segments":[{"ident":"d"}]}},"ident":"numeric_signature"}},"op":"==","right":{"path":{"segments":[{"ident":"signature"}]}}}},"inputs":[{"ident":{"ident":"d"}}],"output":null}}],"method":"filter","receiver":{"method_call":{"args":[],"method":"values","receiver":{"field":{"base":{"path":{"segments":[{"ident":"self"}]}},"ident":"declarations"}}}}}}}},false]}],"vis":"pub"}}],"self_ty":{"path":{"segments":[{"ident":"ProjectReflection"}]}}}},{"mod":{"attrs":[{"meta":{"list":{"delimiter":"paren","path":{"segments":[{"ident":"cfg"}]},"tokens":[{"ident":"test"}]}},"style":"outer"}],"content":[{"use":{"tree":{"path":{"ident":"super","tree":"*"}}}},{"use":{"tree":{"path":{"ident":"project_algebra","tree":{"ident":"Feature"}}}}},{"fn":{"attrs":[{"meta":{"path":{"segments":[{"ident":"test"}]}},"style":"outer"}],"ident":"reflection_works","inputs":[],"output":null,"stmts":[{"let":{"init":{"expr":{"call":{"args":[],"func":{"path":{"segments":[{"ident":"ProjectReflection"},{"ident":"new"}]}}}}},"pat":{"ident":{"ident":"reflector","mut":true}}}},{"expr":[{"method_call":{"args":[{"lit":{"str":"\"CoreProject\""}},{"macro":{"delimiter":"bracket","path":{"segments":[{"ident":"vec"}]},"tokens":[{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Developer"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Package"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Modular"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"RustLang"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Web"},{"punct":{"op":",","spacing":"alone"}}]}}],"method":"add_declaration","receiver":{"path":{"segments":[{"ident":"reflector"}]}}}},true]},{"expr":[{"method_call":{"args":[{"lit":{"str":"\"FunLayer\""}},{"macro":{"delimiter":"bracket","path":{"segments":[{"ident":"vec"}]},"tokens":[{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Fun"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Introspection"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Docs"}]}}],"method":"add_declaration","receiver":{"path":{"segments":[{"ident":"reflector"}]}}}},true]},{"expr":[{"method_call":{"args":[{"lit":{"str":"\"WebComponents\""}},{"macro":{"delimiter":"bracket","path":{"segments":[{"ident":"vec"}]},"tokens":[{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Web"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"Modular"},{"punct":{"op":",","spacing":"alone"}},{"ident":"Feature"},{"punct":{"op":":","spacing":"joint"}},{"punct":{"op":":","spacing":"alone"}},{"ident":"RustLang"}]}}],"method":"add_declaration","receiver":{"path":{"segments":[{"ident":"reflector"}]}}}},true]},{"macro":{"delimiter":"paren","path":{"segments":[{"ident":"assert_eq"}]},"semi_token":true,"tokens":[{"ident":"reflector"},{"punct":{"op":".","spacing":"alone"}},{"ident":"signature_for"},{"group":{"delimiter":"parenthesis","stream":[{"lit":"\"CoreProject\""}]}},{"punct":{"op":",","spacing":"alone"}},{"ident":"Some"},{"group":{"delimiter":"parenthesis","stream":[{"lit":"4862"}]}}]}},{"let":{"init":{"expr":{"method_call":{"args":[{"lit":{"int":"31"}}],"method":"declarations_by_signature","receiver":{"path":{"segments":[{"ident":"reflector"}]}}}}},"pat":{"ident":{"ident":"found"}}}},{"macro":{"delimiter":"paren","path":{"segments":[{"ident":"assert_eq"}]},"semi_token":true,"tokens":[{"ident":"found"},{"punct":{"op":".","spacing":"alone"}},{"ident":"len"},{"group":{"delimiter":"parenthesis","stream":[]}},{"punct":{"op":",","spacing":"alone"}},{"lit":"1"}]}},{"macro":{"delimiter":"paren","path":{"segments":[{"ident":"assert_eq"}]},"semi_token":true,"tokens":[{"ident":"found"},{"group":{"delimiter":"bracket","stream":[{"lit":"0"}]}},{"punct":{"op":".","spacing":"alone"}},{"ident":"name"},{"punct":{"op":",","spacing":"alone"}},{"lit":"\"FunLayer\""}]}}]}}],"ident":"tests"}}]},"file_path":"src\\project_reflector.rs","summary":{"emoji_counts_in_strings":{},"string_literals":["\" Reflection information for a declaration in code, linking its symbolic name to algebraic value.\"","\" Holds all reflected declarations for the project\"","\" Add a new reflected declaration\"","\" Find a declaration\\'s numeric signature by name\"","\" List all declarations and their algebraic signatures\"","\" Find declaration(s) by numeric signature\"","\"CoreProject\"","\"FunLayer\"","\"WebComponents\"","\"CoreProject\"","4862","1","0","\"FunLayer\""],"top_level_nodes":1,"total_nodes":652,"type_counts":{"angle_bracketed":9,"args":31,"arguments":9,"attrs":8,"base":8,"binary":1,"body":4,"bounds":2,"call":3,"closure":4,"colon_token":6,"content":1,"delimiter":13,"elem":7,"elems":3,"expr":17,"field":8,"fields":4,"fn":7,"func":3,"group":5,"ident":177,"impl":2,"impl_trait":2,"init":4,"inputs":11,"int":1,"items":3,"left":1,"let":4,"list":3,"lit":15,"macro":6,"meta":10,"method":19,"method_call":19,"mod":1,"mut":3,"name_value":6,"named":2,"op":38,"output":11,"pat":10,"path":82,"punct":37,"receiver":23,"ref":4,"reference":7,"right":1,"segments":76,"self_ty":2,"semi_token":3,"spacing":37,"stmts":7,"str":9,"stream":4,"struct":4,"style":10,"tokens":9,"trait":2,"tree":10,"tuple":3,"ty":14,"type":10,"typed":6,"use":4,"value":6,"vis":12},"word_counts":{"0":1,"1":1,"4862":1,"a":3,"add":1,"algebraic":2,"all":2,"and":1,"by":2,"code":1,"components":1,"core":2,"declaration":4,"declarations":2,"find":2,"for":2,"fun":2,"holds":1,"in":1,"information":1,"its":1,"layer":2,"linking":1,"list":1,"name":2,"new":1,"numeric":2,"project":3,"reflected":2,"reflection":1,"s":2,"signature":2,"signatures":1,"symbolic":1,"the":1,"their":1,"to":1,"value":1,"web":1},"word_emoji_counts":{"0️⃣":1,"1️⃣":1,"⏱️":2,"✅":1,"💎":1}},"timestamp":1751587424}],"metadata":{"chunk_index":28,"num_examples":1,"total_size_bytes":14180}} |