nourl

Crates.ionourl
lib.rsnourl
version0.1.1
sourcesrc
created_at2023-01-30 11:11:38.336393
updated_at2023-01-30 11:48:16.277947
descriptionA simple Url primitive for no_std environments
homepage
repositoryhttps://github.com/rmja/nourl
max_upload_size
id771673
size9,944
Rasmus Melchior Jacobsen (rmja)

documentation

README

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.

Commit count: 18

cargo fmt