{"id":16872372,"url":"https://github.com/robjtede/impl-more","last_synced_at":"2025-03-22T07:31:15.801Z","repository":{"id":61573463,"uuid":"541311381","full_name":"robjtede/impl-more","owner":"robjtede","description":"Concise trait implementations","archived":false,"fork":false,"pushed_at":"2024-12-24T08:33:41.000Z","size":103,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T13:37:51.978Z","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/robjtede.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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},"funding":{"github":["robjtede"]}},"created_at":"2022-09-25T21:15:11.000Z","updated_at":"2024-12-24T08:33:37.000Z","dependencies_parsed_at":"2024-10-16T21:42:48.466Z","dependency_job_id":"ced2f479-0109-4f50-9c09-5fc5b6e4a296","html_url":"https://github.com/robjtede/impl-more","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"c8832c690a38801c2779e519ed1b7c2255d2c3ab"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robjtede%2Fimpl-more","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robjtede%2Fimpl-more/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robjtede%2Fimpl-more/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robjtede%2Fimpl-more/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robjtede","download_url":"https://codeload.github.com/robjtede/impl-more/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244925084,"owners_count":20532873,"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-13T15:14:33.516Z","updated_at":"2025-03-22T07:31:15.795Z","avatar_url":"https://github.com/robjtede.png","language":"Rust","funding_links":["https://github.com/sponsors/robjtede"],"categories":[],"sub_categories":[],"readme":"# `impl-more`\n\n\u003e Concise trait implementations.\n\n\u003c!-- prettier-ignore-start --\u003e\n\n[![crates.io](https://img.shields.io/crates/v/impl-more?label=latest)](https://crates.io/crates/impl-more)\n[![Documentation](https://docs.rs/impl-more/badge.svg)](https://docs.rs/impl-more/0.1.9)\n![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/impl-more.svg)\n\u003cbr /\u003e\n[![dependency status](https://deps.rs/crate/impl-more/0.1.9/status.svg)](https://deps.rs/crate/impl-more/0.1.9)\n[![Download](https://img.shields.io/crates/d/impl-more.svg)](https://crates.io/crates/impl-more)\n[![CircleCI](https://circleci.com/gh/robjtede/impl-more/tree/main.svg?style=shield)](https://circleci.com/gh/robjtede/impl-more/tree/main)\n\n\u003c!-- prettier-ignore-end --\u003e\n\n# Usage\n\n```rust\nstruct MyNewTypeStruct(String);\n\nimpl_more::impl_as_ref!(MyNewTypeStruct =\u003e String);\nimpl_more::impl_as_mut!(MyNewTypeStruct =\u003e String);\n\nimpl_more::impl_deref!(MyNewTypeStruct =\u003e String);\nimpl_more::impl_deref_mut!(MyNewTypeStruct);\n// or, to deref through String too:\n// impl_more::forward_deref_and_mut!(MyNewTypeStruct, ref str);\n\nimpl_more::impl_from!(String =\u003e MyNewTypeStruct);\nimpl_more::impl_into!(MyNewTypeStruct =\u003e String);\n\nenum MyEnum {\n    Bar,\n    Qux,\n}\n\nimpl_more::impl_display_enum!(MyEnum, Bar =\u003e \"bar\", Qux =\u003e \"qux\");\n\nenum Coords {\n    Xy(i64, i64),\n    Xyz(i64, i64, i64),\n}\n\nimpl_more::impl_display_enum!(\n    Coords,\n    Xy(x, y) =\u003e \"{x}, {y}\",\n    Xyz(x, y, z) =\u003e \"{x}, {y}, {z}\",\n);\n\n#[derive(Debug)]\nstruct MyError(eyre::Report);\n\nimpl_more::forward_display!(MyError);\nimpl_more::forward_error!(MyError);\n\nlet err = MyError(eyre::eyre!(\"something went wrong\"));\nassert_eq!(err.source().unwrap().to_string(), \"something went wrong\");\n\n#[derive(Debug)]\nenum Err {\n    Io(std::io::Error),\n    Generic(String),\n}\n\nimpl_more::impl_display_enum!(Err, Io(err) =\u003e \"{err}\", Generic(msg) =\u003e \"{msg}\");\nimpl_more::impl_error_enum!(Err, Io(err) =\u003e err);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobjtede%2Fimpl-more","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobjtede%2Fimpl-more","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobjtede%2Fimpl-more/lists"}