pub enum SetPortError {
NoHost(NoHost),
EmptyHost,
SchemeIsFile,
InvalidPort(InvalidPort),
CantHavePort,
TooLong(TooLong),
}Expand description
The error BetterUrl::set_port returns when it fails.
Variants§
NoHost(NoHost)
EmptyHost
Returned when attempting to set the port of an empty host.
SchemeIsFile
Returned when attempting to set the port of a file URL.
InvalidPort(InvalidPort)
CantHavePort
Returned when attempting to set a URL that can’t have a port to have a port.
TooLong(TooLong)
Trait Implementations§
Source§impl Debug for SetPortError
impl Debug for SetPortError
Source§impl Display for SetPortError
impl Display for SetPortError
Source§impl Error for SetPortError
impl Error for SetPortError
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<!> for SetPortError
impl From<!> for SetPortError
Source§fn from(value: Infallible) -> Self
fn from(value: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<InvalidPort> for SetPortError
impl From<InvalidPort> for SetPortError
Source§fn from(source: InvalidPort) -> Self
fn from(source: InvalidPort) -> Self
Converts to this type from the input type.
Source§impl From<NoHost> for SetPortError
impl From<NoHost> for SetPortError
Source§impl From<SetPortError> for SetHostPortError
impl From<SetPortError> for SetHostPortError
Source§fn from(source: SetPortError) -> Self
fn from(source: SetPortError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SetPortError
impl RefUnwindSafe for SetPortError
impl Send for SetPortError
impl Sync for SetPortError
impl Unpin for SetPortError
impl UnsafeUnpin for SetPortError
impl UnwindSafe for SetPortError
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