Primary value for expressing which scheme a url uses.
This is an enum to define and enforce the crate semantics of what it means for a url to be valid for our use-case. A url can be in one of two states: it either uses https or it uses http. While this can be achieved by toggling https on and off via a boolean value, a boolean value weakens the semantics and constrains the range of possible schemes that can be used in the future.
Scheme::Https is also more explicit than saying
it also has the added benefit of being discoverable. When usage is
url.scheme(Scheme::...), the range of possible schemes can be discovered
by IDE code completion tools.
impl StructuralPartialEq for Scheme[src]
impl RefUnwindSafe for Scheme
impl UnwindSafe for Scheme
type Error = Infallible
The type returned in the event of a conversion error.