url-macro

Crates.iourl-macro
lib.rsurl-macro
version0.2.0
sourcesrc
created_at2024-07-19 07:51:52.211529+00
updated_at2025-03-30 09:15:14.510403+00
descriptionA 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.
homepagehttps://github.com/DenisGorbachev/url-macro
repositoryhttps://github.com/DenisGorbachev/url-macro
max_upload_size
id1308379
size49,778
Denis Gorbachev (DenisGorbachev)

documentation

README

Compile-time URL validation

Build Documentation

This crate provides a url! macro for compile-time URL validation.

Examples

// This compiles correctly
let valid = url!("https://www.rust-lang.org/");
// This triggers a compiler error
let invalid = url!("foo");

Installation

cargo add url-macro url

Gratitude

Like the project? ⭐ Star this repo on GitHub!

License

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.

Commit count: 0

cargo fmt