Crates.io | url-macro |
lib.rs | url-macro |
version | 0.2.0 |
source | src |
created_at | 2024-07-19 07:51:52.211529+00 |
updated_at | 2025-03-30 09:15:14.510403+00 |
description | A compile-time URL validation macro. Parses and checks URLs at compile-time, converting valid URLs into `url::Url` objects. Provides early error detection for malformed URLs. |
homepage | https://github.com/DenisGorbachev/url-macro |
repository | https://github.com/DenisGorbachev/url-macro |
max_upload_size | |
id | 1308379 |
size | 49,778 |
This crate provides a url! macro for compile-time URL validation.
// This compiles correctly
let valid = url!("https://www.rust-lang.org/");
// This triggers a compiler error
let invalid = url!("foo");
cargo add url-macro url
Like the project? ⭐ Star this repo on GitHub!
Apache-2.0 or MIT.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, shall be licensed as above, without any additional terms or conditions.