
Uri::smarturi is a sort of "subclass" of uri using delegation with some extra methods, all the methods that work for uris will work on these objects as well.
it's similar in spirit to uri::withbase.
it's also completely safe to subclass for your own use.