{"id":16853533,"url":"https://github.com/cosmichorrordev/smart-debug","last_synced_at":"2025-03-18T10:24:38.133Z","repository":{"id":183294410,"uuid":"669907926","full_name":"CosmicHorrorDev/smart-debug","owner":"CosmicHorrorDev","description":"Derive macro for `Debug` with easy manipulation of fields","archived":false,"fork":false,"pushed_at":"2023-11-05T23:19:42.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T07:04:27.391Z","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/CosmicHorrorDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-07-23T20:21:19.000Z","updated_at":"2023-12-28T23:09:10.000Z","dependencies_parsed_at":"2023-07-23T20:44:02.103Z","dependency_job_id":"6be81b5e-da15-4b03-9f6f-c4354547490c","html_url":"https://github.com/CosmicHorrorDev/smart-debug","commit_stats":null,"previous_names":["cosmichorrordev/smart-debug"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmicHorrorDev%2Fsmart-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmicHorrorDev%2Fsmart-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmicHorrorDev%2Fsmart-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmicHorrorDev%2Fsmart-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CosmicHorrorDev","download_url":"https://codeload.github.com/CosmicHorrorDev/smart-debug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244199678,"owners_count":20414701,"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-13T13:52:02.647Z","updated_at":"2025-03-18T10:24:38.114Z","avatar_url":"https://github.com/CosmicHorrorDev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"**⚠️ !!This is currently pre-alpha software!! ⚠️**\n\nAllows for easy manipulation of debug formatting through a derive macro\n\n```rust\nuse smart_debug::SmartDebug;\nuse std::fmt;\n\n#[derive(SmartDebug, Default)]\n#[debug(skip_defaults)]\nstruct Text {\n    #[debug(no_skip)]\n    text: \u0026'static str,\n    #[debug(\"0x{:06x}\")]\n    color: u32,\n    #[debug(wrapper = DebugInline)]\n    hyperlink: Option\u003c\u0026'static str\u003e,\n    is_bold: bool,\n    is_italics: bool,\n}\n\n// Wrapper that displays inline even when using pretty formatting (`{:#?}`)\nstruct DebugInline\u003c'inner, T\u003e(pub \u0026'inner T);\n\nimpl\u003cT: fmt::Debug\u003e fmt::Debug for DebugInline\u003c'_, T\u003e {\n    fn fmt(\u0026self, f: \u0026mut fmt::Formatter\u003c'_\u003e) -\u003e fmt::Result {\n        f.write_fmt(format_args!(\"{:?}\", self.0))\n    }\n}\n\nconst HYPERLINK: \u0026str = r#\"\nText {\n    text: \"Look! A link\",\n    color: 0x005cc5,\n    hyperlink: Some(\"https://example.org\"),\n    is_italics: true,\n    ..\n}\n\"#;\n\nfn main() {\n    let hyperlink = Text {\n        text: \"Look! A link\",\n        hyperlink: Some(\"https://example.org\"),\n        color: 0x00_5c_c5,\n        is_italics: true,\n        ..Text::default()\n    };\n\n    let formatted = format!(\"\\n{hyperlink:#?}\\n\");\n    assert_eq!(formatted, HYPERLINK);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmichorrordev%2Fsmart-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmichorrordev%2Fsmart-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmichorrordev%2Fsmart-debug/lists"}