Unobtanium makes heavy use of the url crate and inherits its way of representing parsed URLs.
Also see: The URL Standard
| URL Component | Datatype | If absent | 
|---|---|---|
scheme | 
	str | empty | 
username | 
	str | empty | 
password | 
	Option<str> | empty | 
host | 
	Option<str> | None | 
port | 
	Option<u16> | None | 
path | 
	str | empty | 
query | 
	Option<str> | None | 
fragment | 
	Option<str> | None | 
All values are taken as is, for "special" URLs (mostly http and https) the hostnames are punycode encoded, otherwise they are percent encoded.
Origin
Unobtanium does not follow the url crate when it comes to the URL origin implementation. For unobtanium the Origin is the scheme, host and port taken from the URL and put into a struct. For http, https, ws, wss and ftp the default port numbers are automatically filled in if no port is mentioned in the URL using the port_or_known_default() getter. If two origins are represented using equal data, they equal each other, this simplifies matching and comparing logic across the whole codebase.
Criteria
URLs and Origins can be matched using the Url Criterium and Origin Criterium. Their naming and types follow the above table.