pub enum NetworkParseError {
InvalidHostPart,
AddrParseError(AddrParseError),
NetworkLengthParseError(ParseIntError),
NetworkLengthTooLongError(NetworkLengthTooLongError),
}
Expand description
Error type returned when parsing IP networks
Variants§
InvalidHostPart
The host part wasn’t zero but should have been. The Cidr
types
require that you use the first address in the network (and the
network length) to represent the address, but it wasn’t the
first address.
AddrParseError(AddrParseError)
Failed to parse the address
NetworkLengthParseError(ParseIntError)
Failed to parse the network length
NetworkLengthTooLongError(NetworkLengthTooLongError)
The network length was not valid (but was successfully parsed)
Trait Implementations§
Source§impl Clone for NetworkParseError
impl Clone for NetworkParseError
Source§fn clone(&self) -> NetworkParseError
fn clone(&self) -> NetworkParseError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NetworkParseError
impl Debug for NetworkParseError
Source§impl Display for NetworkParseError
impl Display for NetworkParseError
Source§impl Error for NetworkParseError
impl Error for NetworkParseError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Source§impl From<AddrParseError> for NetworkParseError
impl From<AddrParseError> for NetworkParseError
Source§fn from(e: AddrParseError) -> Self
fn from(e: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<NetworkLengthTooLongError> for NetworkParseError
impl From<NetworkLengthTooLongError> for NetworkParseError
Source§fn from(e: NetworkLengthTooLongError) -> Self
fn from(e: NetworkLengthTooLongError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for NetworkParseError
impl From<ParseIntError> for NetworkParseError
Source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NetworkParseError
impl PartialEq for NetworkParseError
impl StructuralPartialEq for NetworkParseError
Auto Trait Implementations§
impl Freeze for NetworkParseError
impl RefUnwindSafe for NetworkParseError
impl Send for NetworkParseError
impl Sync for NetworkParseError
impl Unpin for NetworkParseError
impl UnwindSafe for NetworkParseError
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