servo / rust-url

URL parser for Rust
https://docs.rs/url/
Apache License 2.0
1.31k stars 325 forks source link

Please could you export `SchemeType` or add `is_special()` method to `Url` #800

Closed samuelcolvin closed 1 year ago

samuelcolvin commented 1 year ago

Currently there's no way to check if a url/scheme is "special" without duplicating logic from

https://github.com/servo/rust-url/blob/1c1e406874b3d2aa6f36c5d2f3a5c2ea74af9efb/url/src/parser.rs#L161-L167

Would be great if this could be made public, or an is_special method added to Url.

Also, I guess SchemeType::from should probably be implemented via the Into trait?

qsantos commented 1 year ago

See https://github.com/servo/rust-url/pull/826