Crates.io | url-decompose |
lib.rs | url-decompose |
version | 0.1.1 |
source | src |
created_at | 2021-06-03 11:46:35.236173 |
updated_at | 2022-08-28 23:46:07.426492 |
description | Decompose an url into parts |
homepage | |
repository | https://github.com/glcraft/url-decompose |
max_upload_size | |
id | 405647 |
size | 18,992 |
Provides a struct [Url
] to decompose the url into a set of string slice.
Some utilities functions are also provided.
You can notice this crate is very similar to the url crate. That's right : url-decompose almost does the same thing.
As I started to make this crate, I didn't know the existance of "url" so I went to URI RFC to make my own implementation (using a regex). When I discover "url" crate, I decided to keep on my crate for some reasons :
Url store the value/reference which its type implements AsRef<str>
. So Url can store a String (so Url owns the string) or &str (so Url keeps a reference to
another String) or whatever implements AsRef<str>
.
As I'm writing, there is 2 files 400 lines in totale, and needs 3 dependencies. Of course, the crate should evolve to something better in parsing, but it'll still remain light.