#[non_exhaustive]pub enum ValidationWarningKind {
MixedScriptString(String),
BidiCharsInString(String),
BidiCharsInIdentifier(String),
MixedScriptIdentifier(String),
ConfusableIdentifier(String),
ImpossiblePolicy,
}
Expand description
Represents the different kinds of validation warnings and information
specific to that warning. Marked as non_exhaustive
to allow adding
additional warnings in the future as a non-breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MixedScriptString(String)
A string contains mixed scripts. Different scripts can contain visually similar characters which may be confused for each other.
BidiCharsInString(String)
A string contains BIDI control characters. These can be used to create crafted pieces of code that obfuscate true control flow.
BidiCharsInIdentifier(String)
An id contains BIDI control characters. These can be used to create crafted pieces of code that obfuscate true control flow.
MixedScriptIdentifier(String)
An id contains mixed scripts. This can cause characters to be confused for each other.
ConfusableIdentifier(String)
An id contains characters that fall outside of the General Security Profile for Identifiers. We recommend adhering to this if possible. See Unicode® Technical Standard #39 for more info.
ImpossiblePolicy
The typechecker found that a policy condition will always evaluate to false.
Trait Implementations§
source§impl Clone for ValidationWarningKind
impl Clone for ValidationWarningKind
source§fn clone(&self) -> ValidationWarningKind
fn clone(&self) -> ValidationWarningKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ValidationWarningKind
impl Debug for ValidationWarningKind
source§impl Diagnostic for ValidationWarningKind
impl Diagnostic for ValidationWarningKind
source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandler
s to change the display format
of this diagnostic. Read moresource§fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic
. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or enums will work just fine.source§fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic
. Do you have any
advice for the poor soul who’s just run into this issue?source§fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic
.source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic
’s Diagnostic::labels
to.source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic
’s Diagnostic::source_code
Diagnostic
s.source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
source§impl Display for ValidationWarningKind
impl Display for ValidationWarningKind
source§impl Error for ValidationWarningKind
impl Error for ValidationWarningKind
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl Hash for ValidationWarningKind
impl Hash for ValidationWarningKind
source§impl PartialEq for ValidationWarningKind
impl PartialEq for ValidationWarningKind
impl Eq for ValidationWarningKind
impl StructuralPartialEq for ValidationWarningKind
Auto Trait Implementations§
impl Freeze for ValidationWarningKind
impl RefUnwindSafe for ValidationWarningKind
impl Send for ValidationWarningKind
impl Sync for ValidationWarningKind
impl Unpin for ValidationWarningKind
impl UnwindSafe for ValidationWarningKind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more