pub enum SocketAddressParsingError {
Io(Error),
Empty,
Parse(String),
Port(ParseIntError),
}
Expand description
Error thrown while parsing a socket address.
Variants§
Io(Error)
Failed to convert the string into a socket addr
Empty
Input must not be empty
Parse(String)
Failed to parse the address
Port(ParseIntError)
Failed to parse port
Trait Implementations§
Source§impl Debug for SocketAddressParsingError
impl Debug for SocketAddressParsingError
Source§impl Display for SocketAddressParsingError
impl Display for SocketAddressParsingError
Source§impl Error for SocketAddressParsingError
impl Error for SocketAddressParsingError
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 From<Error> for SocketAddressParsingError
impl From<Error> for SocketAddressParsingError
Source§impl From<ParseIntError> for SocketAddressParsingError
impl From<ParseIntError> for SocketAddressParsingError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SocketAddressParsingError
impl !RefUnwindSafe for SocketAddressParsingError
impl Send for SocketAddressParsingError
impl Sync for SocketAddressParsingError
impl Unpin for SocketAddressParsingError
impl !UnwindSafe for SocketAddressParsingError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Io
: 16 bytesEmpty
: 0 bytesParse
: 24 bytesPort
: 9 bytes