pub enum LocationParseError {
UnexpectedComponentCount(String, usize),
UnexpectedScheme(String, String),
UnexpectedNonEmptySecondComponent(String, String),
UnexpectedHost(String, String),
UnexpectedPath(String, String),
RegionName(String, RegionNameError),
X(String, ParseIntError),
Y(String, ParseIntError),
Z(String, ParseIntError),
}Expand description
the possible errors that can occur when parsing a String to a Location
Variants§
UnexpectedComponentCount(String, usize)
unexpected number of /-separated components in the location URL
UnexpectedScheme(String, String)
unexpected scheme in the location URL
UnexpectedNonEmptySecondComponent(String, String)
unexpected non-empty second component in location URL
UnexpectedHost(String, String)
unexpected host in the location URL
UnexpectedPath(String, String)
unexpected path in the location URL
RegionName(String, RegionNameError)
error parsing the region name
X(String, ParseIntError)
error parsing the X coordinate
Y(String, ParseIntError)
error parsing the Y coordinate
Z(String, ParseIntError)
error parsing the Z coordinate
Implementations§
Source§impl LocationParseError
impl LocationParseError
Sourcepub const fn is_unexpected_component_count(&self) -> bool
pub const fn is_unexpected_component_count(&self) -> bool
Returns true if the enum is LocationParseError::UnexpectedComponentCount otherwise false
Sourcepub const fn is_unexpected_scheme(&self) -> bool
pub const fn is_unexpected_scheme(&self) -> bool
Returns true if the enum is LocationParseError::UnexpectedScheme otherwise false
Sourcepub const fn is_unexpected_non_empty_second_component(&self) -> bool
pub const fn is_unexpected_non_empty_second_component(&self) -> bool
Returns true if the enum is LocationParseError::UnexpectedNonEmptySecondComponent otherwise false
Sourcepub const fn is_unexpected_host(&self) -> bool
pub const fn is_unexpected_host(&self) -> bool
Returns true if the enum is LocationParseError::UnexpectedHost otherwise false
Sourcepub const fn is_unexpected_path(&self) -> bool
pub const fn is_unexpected_path(&self) -> bool
Returns true if the enum is LocationParseError::UnexpectedPath otherwise false
Sourcepub const fn is_region_name(&self) -> bool
pub const fn is_region_name(&self) -> bool
Returns true if the enum is LocationParseError::RegionName otherwise false
Sourcepub const fn is_x(&self) -> bool
pub const fn is_x(&self) -> bool
Returns true if the enum is LocationParseError::X otherwise false
Trait Implementations§
Source§impl Clone for LocationParseError
impl Clone for LocationParseError
Source§fn clone(&self) -> LocationParseError
fn clone(&self) -> LocationParseError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more