better-url 0.12.0

A better URL crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Constructor stuff.

use crate::prelude::*;

mod file;
mod special_not_file;
mod non_special;

impl BetterUrl {
    /// Parse the rest of a URL given the scheme.
    pub(crate) fn after_scheme_bytes(scheme: Scheme<'_>, rest: &[u8]) -> Result<Self, InvalidUrl> {
        match scheme.r#type() {
            SchemeType::File           => Self::new_file_bytes            (scheme, rest),
            SchemeType::SpecialNotFile => Self::new_special_not_file_bytes(scheme, rest),
            SchemeType::NonSpecial     => Self::new_non_special_bytes     (scheme, rest),
        }
    }
}