[−][src]Module iri_string::types
URI and IRI types.
IRI types
Defined in RFC 3987.
a URI (defined in RFC 3986) is also an IRI.
IRI = scheme ":" ihier-part [ "?" iquery ] [ "#" ifragment ]
IRI-reference = IRI / irelative-ref
absolute-IRI = scheme ":" ihier-part [ "?" iquery ]
irelative-ref = irelative-part [ "?" iquery ] [ "#" ifragment ]
(`irelative-part` is roughly same as `ihier-part`.)
Hierarchy:
IriReferenceStr
|-- IriStr
| `-- AbsoluteIriStr
`-- RelativeIriStr
Therefore, the conversions below are safe and cheap:
IriStr -> IriReferenceStrAbsoluteIriStr -> IriStrAbsoluteIriStr -> IriReferenceStrRelativeIriStr -> IriReferenceStr
For safely convertible types (consider FooStr -> BarStr is safe), traits
below are implemented:
AsRef<BarStr> for FooStrAsRef<BarStr> for FooStringFrom<FooString> for BarStringPartialEq<FooStr> for BarStrand lots of impls like thatPartialEqandParitalOrd.- Slice, owned,
Cow, reference, etc...
URI types
Currently not implemented :-P.
Structs
| AbsoluteIriStr | A borrowed slice of an absolute IRI without fragment part. |
| AbsoluteIriString | An owned string of an absolute IRI without fragment part. |
| IriCreationError | Error on conversion into an IRI type. |
| IriFragmentStr | A borrowed slice of an IRI. |
| IriFragmentString | An owned string of an IRI fragment. |
| IriReferenceStr | A borrowed slice of an IRI reference. |
| IriReferenceString | An owned string of an IRI reference. |
| IriStr | A borrowed string of an absolute IRI possibly with fragment part. |
| IriString | An owned string of an absolute IRI possibly with fragment part. |
| RelativeIriStr | A borrowed slice of a relative IRI. |
| RelativeIriString | An owned string of a relative IRI. |
Type Definitions
| CreationError | Deprecated Error on conversion into an IRI type. |