A simple Url primitive for no_std environments https://github.com/rmja/nourl
Go to file
Rasmus Melchior Jacobsen 576267ada6 Separate licenses with /
2023-01-30 12:11:34 +01:00
.github/workflows Rename workflow to CI 2023-01-30 10:01:41 +01:00
src Initial commit 2023-01-30 09:48:57 +01:00
.gitignore Initial commit 2023-01-30 09:48:57 +01:00
Cargo.toml Separate licenses with / 2023-01-30 12:11:34 +01:00
README.md Update README.md 2023-01-30 10:03:32 +01:00

A simple Url primitive

CI crates.io

This crate provides a simple Url type that can be used in embedded no_std environments.

If you are missing a feature or would like to add a new scheme, please raise an issue or a PR.

The crate runs on stable rust.

Example

let url = Url::parse("http://localhost/foo/bar").unwrap();
assert_eq!(url.scheme(), UrlScheme::HTTP);
assert_eq!(url.host(), "localhost");
assert_eq!(url.port_or_default(), 80);
assert_eq!(url.path(), "/foo/bar");

The implementation is heavily inspired (close to copy/pase) from the Url type in reqwless.