Function fragment
fn fragment<S: Spec>(s: &str) -> Result<(), Error>
Validates IRI fragment.
This validator corresponds to RiFragmentStr and RiFragmentString types.
Note that the first # character in an IRI is not a part of a fragment.
For example, https://example.com/#foo has a fragment foo, not #foo.
Examples
This type can have an IRI fragment.
Note that the IRI foo://bar/baz#qux has the fragment qux, not #qux.
use ;
assert!;
assert!;
assert!;
assert!;
assert!;
assert!;
assert!;
Some characters and sequences cannot used in a fragment.
use ;
// `<` and `>` cannot directly appear in an IRI reference.
assert!;
// Broken percent encoding cannot appear in an IRI reference.
assert!;
assert!;
// Hash sign `#` cannot appear in an IRI fragment.
assert!;