{"id":24737467,"url":"https://github.com/engineersbox/rust-struct-reification","last_synced_at":"2025-10-06T11:49:28.393Z","repository":{"id":109327976,"uuid":"474262573","full_name":"EngineersBox/Rust-Struct-Reification","owner":"EngineersBox","description":"A macro to reify structs and their fields for type-safe runtime invocation and reflective access to fields and attributes","archived":false,"fork":false,"pushed_at":"2022-03-27T07:17:27.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T17:44:52.065Z","etag":null,"topics":["attributes","reflection","reification","rust","struct"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EngineersBox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-26T06:27:08.000Z","updated_at":"2022-08-26T10:07:37.000Z","dependencies_parsed_at":"2023-06-06T07:15:38.644Z","dependency_job_id":null,"html_url":"https://github.com/EngineersBox/Rust-Struct-Reification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EngineersBox/Rust-Struct-Reification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FRust-Struct-Reification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FRust-Struct-Reification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FRust-Struct-Reification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FRust-Struct-Reification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EngineersBox","download_url":"https://codeload.github.com/EngineersBox/Rust-Struct-Reification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FRust-Struct-Reification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278606354,"owners_count":26014616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attributes","reflection","reification","rust","struct"],"created_at":"2025-01-27T22:08:26.209Z","updated_at":"2025-10-06T11:49:28.388Z","avatar_url":"https://github.com/EngineersBox.png","language":"Rust","readme":"# Rust-Struct-Reification\nA macro to reify structs and their fields for type-safe runtime invocation and reflective access to fields and attributes\n\n## Example:\n\n```rust\nuse crate::reify;\n\nreify!{\n    struct TestStruct {\n        #[some_attr=5]\n        pub field1: u64,\n        #[macro_attr(Value)]\n        field2: Vec\u003cString\u003e,\n        field3: Box\u003cu16\u003e,\n    }\n}\n\nimpl TestStruct {\n    pub fn new() -\u003e TestStruct {\n        return TestStruct {\n            field1: 42,\n            field2: vec![String::from(\"something\"), String::from(\"else\")],\n            field3: Box::new(64),\n        };\n    }\n}\n\nfn main() {\n    println!(\"{:?}\", TestStruct::get_field_attribute_map());\n    // Prints: { \"field1\": \"some_attr=5\", \"field2\": \"macro_attr(Value)\", \"field3\": \"\" }\n    println!(\"{:?}\", TestStruct::get_field_attribute(\"field1\"));\n    // Prints: Ok(Some(\"some_attr=5\"))\n    println!(\"{:?}\", TestStruct::get_field_attribute(\"field3\"));\n    // Prints: Ok(None)\n    println!(\"{:?}\", TestStruct::get_field_attribute(\"field4\"));\n    // Prints: Err(TypedAttributeRetrievalError{ message: \"...\" })\n\n    let test_struct: TestStruct = TestStruct::new();\n    println!(\"{:?}\", test_struct::get_field(\"field1\"));\n    // Prints: Ok(Any { .. })\n    println!(\"{:?}\", test_struct::get_field_typed::\u003cVec\u003cString\u003e\u003e(\"field2\"))\n    // Prints: Ok({ \"something\", \"else\" })\n}\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineersbox%2Frust-struct-reification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineersbox%2Frust-struct-reification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineersbox%2Frust-struct-reification/lists"}