pub enum ParseError<'a> {
Show 14 variants
InvalidComponent(&'a str),
InvalidCidr(&'a str),
UnexpectedCharacter(char, usize),
InvalidIp,
InvalidIpv4,
Ipv4InvalidComponentSize(u8),
InvalidIpv6,
Ipv6InvalidComponentSize(u8),
Ipv6MultipleZeroAbbrv,
NonAsciiCharacter(usize),
MissingIp,
MissingCidr,
Ipv4CidrPrefixOverflow(u8),
Ipv6CidrPrefixOverflow(u8),
}Expand description
Possible errors parsings IP addr
Variants§
InvalidComponent(&'a str)
Invalid address component
InvalidCidr(&'a str)
Invalid CIDR prefix
UnexpectedCharacter(char, usize)
Unexpected character with position where it is encountered at
InvalidIp
Input is not valid IP
InvalidIpv4
Address is not valid IPv4
Ipv4InvalidComponentSize(u8)
IPv4 Address must have 4 components
InvalidIpv6
Address is not valid IPv6
Ipv6InvalidComponentSize(u8)
IPv6 Address must have 8 components
Ipv6MultipleZeroAbbrv
IPv6 contains more than 1 zero abbreviation
NonAsciiCharacter(usize)
Unexpected Non-ASCII character encountered
MissingIp
IP address is not specified
MissingCidr
Prefix is not specified
Ipv4CidrPrefixOverflow(u8)
Prefix is greater than 32
Ipv6CidrPrefixOverflow(u8)
Prefix is greater than 128
Trait Implementations§
Source§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
Source§impl Display for ParseError<'_>
impl Display for ParseError<'_>
Source§impl Error for ParseError<'_>
impl Error for ParseError<'_>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<'a> PartialEq for ParseError<'a>
impl<'a> PartialEq for ParseError<'a>
impl<'a> Eq for ParseError<'a>
impl<'a> StructuralPartialEq for ParseError<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParseError<'a>
impl<'a> RefUnwindSafe for ParseError<'a>
impl<'a> Send for ParseError<'a>
impl<'a> Sync for ParseError<'a>
impl<'a> Unpin for ParseError<'a>
impl<'a> UnwindSafe for ParseError<'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