{"id":17223173,"url":"https://github.com/daboross/auto-from","last_synced_at":"2025-10-13T09:09:36.878Z","repository":{"id":150517704,"uuid":"170601376","full_name":"daboross/auto-from","owner":"daboross","description":"Example usage of rust's attribute-like proc-macros","archived":false,"fork":false,"pushed_at":"2019-02-14T00:38:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-24T23:36:44.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daboross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-02-14T00:37:42.000Z","updated_at":"2019-02-14T00:38:17.000Z","dependencies_parsed_at":"2023-05-13T21:27:10.105Z","dependency_job_id":null,"html_url":"https://github.com/daboross/auto-from","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daboross/auto-from","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Fauto-from","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Fauto-from/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Fauto-from/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Fauto-from/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daboross","download_url":"https://codeload.github.com/daboross/auto-from/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Fauto-from/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014482,"owners_count":26085535,"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-13T02:00:06.723Z","response_time":61,"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":[],"created_at":"2024-10-15T04:07:33.480Z","updated_at":"2025-10-13T09:09:36.851Z","avatar_url":"https://github.com/daboross.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"auto-from\n=========\n\nExample usage of attribute proc macros. Mostly for my own reference and testing to reproduce issues\nin more complicated proc macros.\n\nTransforms this:\n\n```rust\nextern crate auto_from;\n\nuse auto_from::auto_from;\n\npub enum Example {\n    Int(i32),\n    Vec { length: usize },\n}\n\n#[auto_from]\nimpl Example {\n    fn ints(i: i32) -\u003e Example {\n        Example::Int(i)\n    }\n\n    fn any_vec\u003cT\u003e(v: Vec\u003cT\u003e) -\u003e Example\n    where\n        T: Clone,\n    {\n        Example::Vec { length: v.len() }\n    }\n}\n```\n\ninto this:\n\n```rust\npub enum Example {\n    Int(i32),\n    Vec { length: usize },\n}\nimpl ::std::convert::From\u003ci32\u003e for Example {\n    fn from(i: i32) -\u003e Example {\n        Example::Int(i)\n    }\n}\nimpl\u003cT\u003e ::std::convert::From\u003cVec\u003cT\u003e\u003e for Example\nwhere\n    T: Clone,\n{\n    fn from(v: Vec\u003cT\u003e) -\u003e Example {\n        Example::Vec { length: v.len() }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaboross%2Fauto-from","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaboross%2Fauto-from","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaboross%2Fauto-from/lists"}