[−][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 -> IriReferenceStr
AbsoluteIriStr -> IriStr
AbsoluteIriStr -> IriReferenceStr
RelativeIriStr -> IriReferenceStr
For safely convertible types (consider FooStr -> BarStr
is safe), traits
below are implemented:
AsRef<BarStr> for FooStr
AsRef<BarStr> for FooString
From<FooString> for BarString
PartialEq<FooStr> for BarStr
and lots of impls like thatPartialEq
andParitalOrd
.- 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. |