{"id":18542856,"url":"https://github.com/bincode-org/unty","last_synced_at":"2025-04-09T18:32:16.964Z","repository":{"id":196254932,"uuid":"695530015","full_name":"bincode-org/unty","owner":"bincode-org","description":"A crate that allows you to mostly-safely cast one type into another type.","archived":false,"fork":false,"pushed_at":"2025-03-07T08:08:46.000Z","size":19,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"trunk","last_synced_at":"2025-04-09T11:09:49.389Z","etag":null,"topics":[],"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/bincode-org.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-09-23T13:23:11.000Z","updated_at":"2025-03-27T15:05:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"567b81be-77b2-469a-8d33-ffbdf2161bfd","html_url":"https://github.com/bincode-org/unty","commit_stats":null,"previous_names":["bincode-org/unty"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bincode-org%2Funty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bincode-org%2Funty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bincode-org%2Funty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bincode-org%2Funty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bincode-org","download_url":"https://codeload.github.com/bincode-org/unty/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027411,"owners_count":21035594,"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-11-06T20:10:56.734Z","updated_at":"2025-04-09T18:32:12.554Z","avatar_url":"https://github.com/bincode-org.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"A crate that allows you to mostly-safely cast one type into another type.\n\nThis is mostly useful for generic functions, e.g.\n\n```rs\npub fn foo\u003cS\u003e(s: S) {\n    if let Ok(a) = unsafe { unty::\u003cS, u8\u003e(s) } {\n        println!(\"It is an u8 with value {a}\");\n    } else {\n        println!(\"it is not an u8\");\n    }\n}\nfoo(10u8); // will print \"it is an u8\"\nfoo(\"test\"); // will print \"it is not an u8\"\n```\n\nThis operation is still unsafe because it allows you to extend lifetimes. There currently is not a way to prevent this\n\n```rs\nif let Ok(str) = unsafe { unty::\u003c\u0026'a str, \u0026'static str\u003e(input) } {\n    // the compiler may now light your PC on fire\n}\n```\n\n# License\n\nThis crate is dual licenced MIT and Apache-2.0, at your own leisure\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbincode-org%2Funty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbincode-org%2Funty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbincode-org%2Funty/lists"}