{"id":16011308,"url":"https://github.com/sof3/derive-trait","last_synced_at":"2025-03-20T09:50:39.060Z","repository":{"id":198854364,"uuid":"701698002","full_name":"SOF3/derive-trait","owner":"SOF3","description":"Derive a trait and a delegating impl from an inherent impl block.","archived":false,"fork":false,"pushed_at":"2023-10-08T07:03:32.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:49:06.270Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SOF3.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":"2023-10-07T09:53:41.000Z","updated_at":"2023-10-07T09:54:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d170f8e-2f52-42bc-bf3b-ed404051d515","html_url":"https://github.com/SOF3/derive-trait","commit_stats":null,"previous_names":["sof3/derive-trait"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SOF3%2Fderive-trait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SOF3%2Fderive-trait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SOF3%2Fderive-trait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SOF3%2Fderive-trait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SOF3","download_url":"https://codeload.github.com/SOF3/derive-trait/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244591502,"owners_count":20477708,"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":[],"created_at":"2024-10-08T13:41:40.062Z","updated_at":"2025-03-20T09:50:39.040Z","avatar_url":"https://github.com/SOF3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# derive-trait\nDerive a trait and a delegating impl from an inherent impl block.\n\n## Why go the opposite way?\nThis macro is designated for single generic types with many small impl blocks\nand complex type bounds in each impl block.\n\n- Without a trait, the function user needs to repeat all the type bounds in the impl block\n  in every function that requests a type supporting the associated functions.\n- Without a macro, the function author needs to write each function signature four times\n  (the trait, the inherent impl, the trait impl and delegation)\n  and the type bounds twice.\n- With the `#[inherent]` macro, the function author would still need to write twice\n (the trait and the trait impl).\n\nNote that use of thsi crate is only advisable for impl blocks with complicated type bounds.\nIt is not advisable to create single-implementor traits blindly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsof3%2Fderive-trait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsof3%2Fderive-trait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsof3%2Fderive-trait/lists"}