pub enum IdentifierPolicyError {
BidiControl(char),
NotXidContinue(char),
ConfusableMixedScript {
ch: char,
looks_like: char,
},
Empty,
TooLong(usize),
}Expand description
The result of validating a Unicode identifier.
Variants§
BidiControl(char)
Contains a BiDi control character (Trojan Source attack).
NotXidContinue(char)
Contains a character that is not XID_Continue.
ConfusableMixedScript
Contains a confusable character mixed with ASCII.
Empty
Identifier is empty.
TooLong(usize)
Identifier is too long (max 255 chars).
Trait Implementations§
Source§impl Clone for IdentifierPolicyError
impl Clone for IdentifierPolicyError
Source§impl Debug for IdentifierPolicyError
impl Debug for IdentifierPolicyError
Source§impl Display for IdentifierPolicyError
impl Display for IdentifierPolicyError
impl Eq for IdentifierPolicyError
Source§impl Error for IdentifierPolicyError
impl Error for IdentifierPolicyError
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 IdentifierPolicyError
impl PartialEq for IdentifierPolicyError
impl StructuralPartialEq for IdentifierPolicyError
Auto Trait Implementations§
impl Freeze for IdentifierPolicyError
impl RefUnwindSafe for IdentifierPolicyError
impl Send for IdentifierPolicyError
impl Sync for IdentifierPolicyError
impl Unpin for IdentifierPolicyError
impl UnsafeUnpin for IdentifierPolicyError
impl UnwindSafe for IdentifierPolicyError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.