Enum uriparse::authority::InvalidPort
source · #[non_exhaustive]
pub enum InvalidPort {
InvalidCharacter,
Overflow,
}
Expand description
An error representing an invalid port.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidCharacter
An invalid character was used in the port. Only decimal digits are allowed.
Overflow
The port was a valid number, but it was too large to fit in a u16
.
Trait Implementations
sourceimpl Clone for InvalidPort
impl Clone for InvalidPort
sourcefn clone(&self) -> InvalidPort
fn clone(&self) -> InvalidPort
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for InvalidPort
impl Debug for InvalidPort
sourceimpl Display for InvalidPort
impl Display for InvalidPort
sourceimpl Error for InvalidPort
impl Error for InvalidPort
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl From<InvalidPort> for InvalidAuthority
impl From<InvalidPort> for InvalidAuthority
sourcefn from(value: InvalidPort) -> Self
fn from(value: InvalidPort) -> Self
Converts to this type from the input type.
sourceimpl Hash for InvalidPort
impl Hash for InvalidPort
sourceimpl PartialEq<InvalidPort> for InvalidPort
impl PartialEq<InvalidPort> for InvalidPort
sourcefn eq(&self, other: &InvalidPort) -> bool
fn eq(&self, other: &InvalidPort) -> bool
impl Copy for InvalidPort
impl Eq for InvalidPort
impl StructuralEq for InvalidPort
impl StructuralPartialEq for InvalidPort
Auto Trait Implementations
impl RefUnwindSafe for InvalidPort
impl Send for InvalidPort
impl Sync for InvalidPort
impl Unpin for InvalidPort
impl UnwindSafe for InvalidPort
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more