iref 4.0.0

Uniform & Internationalized Resource Identifiers (URIs/IRIs), borrowed and owned.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug, Default, Clone, Copy)]
pub struct PathContext {
	pub has_scheme: bool,
	pub has_authority: bool,
}

impl PathContext {
	pub fn from_bytes(bytes: &[u8]) -> Self {
		Self {
			has_scheme: super::parse::find_scheme(bytes, 0).is_some(),
			has_authority: super::parse::find_authority(bytes, 0).is_ok(),
		}
	}
}