pub enum UtilError {
InvalidUrl(String),
InvalidIpAddress(String),
InvalidPort(u16),
InvalidRegex(String),
}Expand description
Error types for utility functions
Variants§
InvalidUrl(String)
Indicates that a URL is invalid or malformed.
This typically occurs when a URL doesn’t follow RFC 3986.
InvalidIpAddress(String)
Indicates that an IP address is invalid or malformed.
This can occur when an address doesn’t follow IPv4 or IPv6 format.
InvalidPort(u16)
Indicates that a port number is invalid.
Port numbers must be between 0 and 65535.
InvalidRegex(String)
Indicates that a regular expression pattern is invalid.
This can occur when constructing regex patterns for various parsing operations.
Trait Implementations§
Source§impl Error for UtilError
impl Error for UtilError
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()
Auto Trait Implementations§
impl Freeze for UtilError
impl RefUnwindSafe for UtilError
impl Send for UtilError
impl Sync for UtilError
impl Unpin for UtilError
impl UnsafeUnpin for UtilError
impl UnwindSafe for UtilError
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