pub enum SchemeStatus {
Historical,
Permanent,
Provisional,
Unregistered,
}
The registration status of a scheme. See RFC 7595 for
more information.
A scheme registered due to historical use. Generally, it is no longer in common use or is
not recommended.
A scheme that has been expertly reviewed.
A scheme that was registered on a first come first served basis.
A scheme that is not currently registerd under
iana.org.
Returns whether or not the scheme status is historical.
use uriparse::Scheme;
assert_eq!(Scheme::Fax.status().is_historical(), true);
assert_eq!(Scheme::HTTP.status().is_historical(), false);
Returns whether or not the scheme status is historical.
use uriparse::Scheme;
assert_eq!(Scheme::HTTP.status().is_permanent(), true);
assert_eq!(Scheme::IRC.status().is_permanent(), false);
Returns whether or not the scheme status is historical.
use uriparse::Scheme;
assert_eq!(Scheme::Git.status().is_provisional(), true);
assert_eq!(Scheme::RTSP.status().is_provisional(), false);
Returns whether or not the scheme status is historical.
use std::convert::TryFrom;
use uriparse::Scheme;
let scheme = Scheme::try_from("test-scheme").unwrap();
assert_eq!(scheme.status().is_unregistered(), true);
assert_eq!(Scheme::HTTPS.status().is_unregistered(), false);
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.