pub enum PortError {
Empty,
InvalidPort,
InvalidPortNumber(u32),
Undelimited,
Unknown(ErrorKind),
}Expand description
An error encountered when parsing an invalid port field in a pgpass file.
Variants§
Empty
The supplied port was empty. This is invalid; use the wildcard character *.
InvalidPort
The port number could not be parsed (eg it contained characters other than digits, or was > u32::MAX).
InvalidPortNumber(u32)
The number supplied was not a valid port number. Valid port numbers are in
the range 1..=65535.
Undelimited
An unanticipated error from nom. This should not happen. If you observe
this error, it is a bug.
The field was not followed by it’s delimiter
Unknown(ErrorKind)
Trait Implementations§
Source§impl Error for PortError
impl Error for PortError
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 From<PortError> for ParsingError
impl From<PortError> for ParsingError
Source§impl ParseError<&str> for PortError
impl ParseError<&str> for PortError
Source§fn from_error_kind(_input: &str, kind: ErrorKind) -> Self
fn from_error_kind(_input: &str, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(_input: &str, _kind: ErrorKind, other: Self) -> Self
fn append(_input: &str, _kind: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
impl Eq for PortError
impl StructuralPartialEq for PortError
Auto Trait Implementations§
impl Freeze for PortError
impl RefUnwindSafe for PortError
impl Send for PortError
impl Sync for PortError
impl Unpin for PortError
impl UnwindSafe for PortError
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