pub enum Url {
Fragment(String),
Other(String),
}
Expand description
A (really) basic URL parser.
It is optimized for the case of COLLADA documents where most “URLs”
are really just names of other entities in the document, prefixed by #
.
Unfortunately the url
crate does not like these fragments,
and we don’t have a base URL to work from since the parser does not do URL resolution.
So we parse fragments and leave everything else to be parsed by a proper URL crate
during resolution.
Variants§
Fragment(String)
A fragment #foo
. The string is the percent-decoded payload "foo"
.
Other(String)
A maybe-URL which is not a fragment. These are unparsed and unvalidated.
Trait Implementations§
impl Eq for Url
impl StructuralPartialEq for Url
Auto Trait Implementations§
impl Freeze for Url
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnwindSafe for Url
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more