pub struct Uri<'a> {
pub raw: &'a str,
pub scheme: &'a str,
pub rest: &'a str,
}Expand description
A parsed URI, split at :// into a scheme and the remainder. The
remainder is left uninterpreted: each UriSourceFactory reads it the
way its scheme needs (a host:port for udp://, a filesystem path for
file://, the whole URI for rtsp://). Minimal by design, so core pulls
no URL-parsing dependency; scheme-specific parsing lives in the handler.
Fields§
§raw: &'a strThe full URI as given, e.g. rtsp://host:554/stream.
scheme: &'a strThe scheme before ://, lowercased-by-convention by the caller.
rest: &'a strEverything after ://: authority + path + query, uninterpreted.
Implementations§
Trait Implementations§
impl<'a> Copy for Uri<'a>
impl<'a> Eq for Uri<'a>
impl<'a> StructuralPartialEq for Uri<'a>
Auto Trait Implementations§
impl<'a> Freeze for Uri<'a>
impl<'a> RefUnwindSafe for Uri<'a>
impl<'a> Send for Uri<'a>
impl<'a> Sync for Uri<'a>
impl<'a> Unpin for Uri<'a>
impl<'a> UnsafeUnpin for Uri<'a>
impl<'a> UnwindSafe for Uri<'a>
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