#[non_exhaustive]pub enum LinkBaseError {
TooLong,
Unprintable,
NotHttp,
BadHost,
BadPrefix,
}Expand description
Why a base or a root was refused.
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.
TooLong
Longer than the longest link sanitize::link accepts, 2,048 bytes.
Unprintable
Holds a character outside printable ASCII: a space, a control, or a letter a URL percent-encodes.
NotHttp
Not an absolute http or https URL.
BadHost
Names no host, puts credentials before it, or holds a backslash in it.
BadPrefix
A root’s prefix that is not a path of printable ASCII starting with /.
Trait Implementations§
Source§impl Clone for LinkBaseError
impl Clone for LinkBaseError
impl Copy for LinkBaseError
Source§impl Debug for LinkBaseError
impl Debug for LinkBaseError
Source§impl Display for LinkBaseError
impl Display for LinkBaseError
impl Eq for LinkBaseError
Source§impl Error for LinkBaseError
impl Error for LinkBaseError
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 PartialEq for LinkBaseError
impl PartialEq for LinkBaseError
impl StructuralPartialEq for LinkBaseError
Auto Trait Implementations§
impl Forget for LinkBaseError
impl Freeze for LinkBaseError
impl Move for LinkBaseError
impl RefUnwindSafe for LinkBaseError
impl Send for LinkBaseError
impl Sync for LinkBaseError
impl Unpin for LinkBaseError
impl UnsafeUnpin for LinkBaseError
impl UnwindSafe for LinkBaseError
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