{"id":22387380,"url":"https://github.com/martinohmann/field_access","last_synced_at":"2026-03-05T16:47:30.440Z","repository":{"id":200575415,"uuid":"704194999","full_name":"martinohmann/field_access","owner":"martinohmann","description":"Dynamic access to struct fields","archived":false,"fork":false,"pushed_at":"2024-11-04T15:25:02.000Z","size":143,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-04T16:20:57.367Z","etag":null,"topics":["access","dynamic","fields","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinohmann.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-12T18:30:30.000Z","updated_at":"2024-11-04T15:24:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ae9f7e6-1bc7-4b4d-aaae-b0946f926f95","html_url":"https://github.com/martinohmann/field_access","commit_stats":{"total_commits":84,"total_committers":3,"mean_commits":28.0,"dds":"0.11904761904761907","last_synced_commit":"2d844c11a6a6ac6836a2f063383d81a4863f4b8d"},"previous_names":["martinohmann/field_access"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Ffield_access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Ffield_access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Ffield_access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Ffield_access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinohmann","download_url":"https://codeload.github.com/martinohmann/field_access/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228147839,"owners_count":17876755,"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","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":["access","dynamic","fields","rust","struct"],"created_at":"2024-12-05T02:08:58.663Z","updated_at":"2026-03-05T16:47:30.383Z","avatar_url":"https://github.com/martinohmann.png","language":"Rust","readme":"# field_access\n\n[![Build Status](https://github.com/martinohmann/field_access/workflows/ci/badge.svg)](https://github.com/martinohmann/field_access/actions?query=workflow%3Aci)\n[![crates.io](https://img.shields.io/crates/v/field_access)](https://crates.io/crates/field_access)\n[![docs.rs](https://img.shields.io/docsrs/field_access)](https://docs.rs/field_access)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA library for dynamic access to struct fields with `#![no_std]` support.\n\nField access is enabled by the `FieldAccess` trait which can be implemented\nusing a derive macro by the same name.\n\n\n```rust\nuse field_access::FieldAccess;\n\n#[derive(FieldAccess)]\nstruct Foo {\n    a: u8\n}\n\nlet mut foo = Foo { a: 1 };\n\n// Immutable field access.\nif let Some(field) = foo.field(\"a\") {\n    assert_eq!(field.as_u8(), Some(1));\n}\n\n// Mutable field access.\nif let Some(mut field) = foo.field_mut(\"a\") {\n    assert_eq!(field.replace(42u8), Some(1));\n}\n\nassert_eq!(foo.a, 42);\n```\n\n## Cargo features\n\n- `alloc`: Provide methods to interact with types from the Rust core allocation\n  and collections library including `String` and `Vec\u003cT\u003e`. This feature pulls\n  in the `alloc` library as a dependency and is enabled by default.\n- `derive`: Provide a derive macro for the `FieldAccess` trait. This feature is\n  enabled by default.\n\n## License\n\nThe source code of field_access is licensed under either of\n[Apache License, Version 2.0](https://github.com/martinohmann/field_access/blob/main/LICENSE-APACHE) or\n[MIT license](https://github.com/martinohmann/field_access/blob/main/LICENSE-MIT) at\nyour option.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinohmann%2Ffield_access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinohmann%2Ffield_access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinohmann%2Ffield_access/lists"}