pub enum ParseOsStrError {
InvalidUtf8,
InvalidAddress(ParseError),
}Expand description
Error that can occur during parsing of SocketAddr from a OsStr/OsString
As opposed to parsing from &str or String, parsing from OsStr can fail due to one more
reason: invalid UTF-8. This error type expresses this possibility and is returned whenever such
conversion is attempted. It is not opaque because the possible variants are pretty much
certain, but it may contain ParseError which is opaque.
This error can be displayed using standard Error trait.
See ParseError for more information.
Variants§
InvalidUtf8
The input was not a valid UTF-8 string
InvalidAddress(ParseError)
The input was a valid UTF-8 string but the address was invalid
Trait Implementations§
Source§impl Debug for ParseOsStrError
impl Debug for ParseOsStrError
Source§impl Display for ParseOsStrError
impl Display for ParseOsStrError
Source§impl Error for ParseOsStrError
impl Error for ParseOsStrError
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<ParseError> for ParseOsStrError
impl From<ParseError> for ParseOsStrError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParseOsStrError
impl RefUnwindSafe for ParseOsStrError
impl Send for ParseOsStrError
impl Sync for ParseOsStrError
impl Unpin for ParseOsStrError
impl UnwindSafe for ParseOsStrError
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