#[non_exhaustive]pub enum SyntaxViolation {
Backslash,
C0SpaceIgnored,
EmbeddedCredentials,
ExpectedDoubleSlash,
ExpectedFileDoubleSlash,
FileWithHostAndWindowsDrive,
NonUrlCodePoint,
NullInFragment,
PercentDecode,
TabOrNewlineIgnored,
UnencodedAtSign,
}
Expand description
Non-fatal syntax violations that can occur during parsing.
This may be extended in the future so exhaustive matching is forbidden.
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.
Backslash
backslash
C0SpaceIgnored
leading or trailing control or space character are ignored in URLs
EmbeddedCredentials
embedding authentication information (username or password) in an URL is not recommended
ExpectedDoubleSlash
expected //
ExpectedFileDoubleSlash
expected // after file:
FileWithHostAndWindowsDrive
file: with host and Windows drive letter
NonUrlCodePoint
non-URL code point
NullInFragment
NULL characters are ignored in URL fragment identifiers
PercentDecode
expected 2 hex digits after %
TabOrNewlineIgnored
tabs or newlines are ignored in URLs
UnencodedAtSign
unencoded @ sign in username or password
Implementations§
Source§impl SyntaxViolation
impl SyntaxViolation
pub fn description(&self) -> &'static str
Trait Implementations§
Source§impl Clone for SyntaxViolation
impl Clone for SyntaxViolation
Source§fn clone(&self) -> SyntaxViolation
fn clone(&self) -> SyntaxViolation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SyntaxViolation
impl Debug for SyntaxViolation
Source§impl Display for SyntaxViolation
impl Display for SyntaxViolation
Source§impl PartialEq for SyntaxViolation
impl PartialEq for SyntaxViolation
impl Copy for SyntaxViolation
impl Eq for SyntaxViolation
impl StructuralPartialEq for SyntaxViolation
Auto Trait Implementations§
impl Freeze for SyntaxViolation
impl RefUnwindSafe for SyntaxViolation
impl Send for SyntaxViolation
impl Sync for SyntaxViolation
impl Unpin for SyntaxViolation
impl UnwindSafe for SyntaxViolation
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