pub enum ValidationWarning {
MixedScriptString(MixedScriptString),
BidiCharsInString(BidiCharsInString),
BidiCharsInIdentifier(BidiCharsInIdentifier),
MixedScriptIdentifier(MixedScriptIdentifier),
ConfusableIdentifier(ConfusableIdentifier),
ImpossiblePolicy(ImpossiblePolicy),
}
Expand description
Represents the different kinds of validation warnings and information specific to that warning.
Variants§
MixedScriptString(MixedScriptString)
A string contains mixed scripts. Different scripts can contain visually similar characters which may be confused for each other.
BidiCharsInString(BidiCharsInString)
A string contains BIDI control characters. These can be used to create crafted pieces of code that obfuscate true control flow.
BidiCharsInIdentifier(BidiCharsInIdentifier)
An id contains BIDI control characters. These can be used to create crafted pieces of code that obfuscate true control flow.
MixedScriptIdentifier(MixedScriptIdentifier)
An id contains mixed scripts. This can cause characters to be confused for each other.
ConfusableIdentifier(ConfusableIdentifier)
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(ImpossiblePolicy)
The typechecker found that a policy condition will always evaluate to false.
Trait Implementations§
Source§impl Clone for ValidationWarning
impl Clone for ValidationWarning
Source§fn clone(&self) -> ValidationWarning
fn clone(&self) -> ValidationWarning
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ValidationWarning
impl Debug for ValidationWarning
Source§impl Diagnostic for ValidationWarning
impl Diagnostic for ValidationWarning
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
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(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandler
s to change the display format
of this diagnostic. Read moreSource§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic
’s Diagnostic::source_code
Source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic
’s Diagnostic::labels
to.Diagnostic
s.Source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Display for ValidationWarning
impl Display for ValidationWarning
Source§impl Error for ValidationWarning
impl Error for ValidationWarning
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 From<BidiCharsInIdentifier> for ValidationWarning
impl From<BidiCharsInIdentifier> for ValidationWarning
Source§fn from(source: BidiCharsInIdentifier) -> Self
fn from(source: BidiCharsInIdentifier) -> Self
Source§impl From<BidiCharsInString> for ValidationWarning
impl From<BidiCharsInString> for ValidationWarning
Source§fn from(source: BidiCharsInString) -> Self
fn from(source: BidiCharsInString) -> Self
Source§impl From<ConfusableIdentifier> for ValidationWarning
impl From<ConfusableIdentifier> for ValidationWarning
Source§fn from(source: ConfusableIdentifier) -> Self
fn from(source: ConfusableIdentifier) -> Self
Source§impl From<ImpossiblePolicy> for ValidationWarning
impl From<ImpossiblePolicy> for ValidationWarning
Source§fn from(source: ImpossiblePolicy) -> Self
fn from(source: ImpossiblePolicy) -> Self
Source§impl From<MixedScriptIdentifier> for ValidationWarning
impl From<MixedScriptIdentifier> for ValidationWarning
Source§fn from(source: MixedScriptIdentifier) -> Self
fn from(source: MixedScriptIdentifier) -> Self
Source§impl From<MixedScriptString> for ValidationWarning
impl From<MixedScriptString> for ValidationWarning
Source§fn from(source: MixedScriptString) -> Self
fn from(source: MixedScriptString) -> Self
Source§impl Hash for ValidationWarning
impl Hash for ValidationWarning
Source§impl PartialEq for ValidationWarning
impl PartialEq for ValidationWarning
impl Eq for ValidationWarning
impl StructuralPartialEq for ValidationWarning
Auto Trait Implementations§
impl Freeze for ValidationWarning
impl RefUnwindSafe for ValidationWarning
impl Send for ValidationWarning
impl Sync for ValidationWarning
impl Unpin for ValidationWarning
impl UnwindSafe for ValidationWarning
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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