pub struct SecurityAnalysis {
pub has_invisible_chars: bool,
pub has_bidi_overrides: bool,
pub has_mixed_scripts: bool,
pub has_confusables: bool,
pub invisible_chars: Vec<(usize, char, &'static str)>,
pub bidi_chars: Vec<(usize, char, &'static str)>,
pub scripts: HashSet<Script>,
pub risk_level: RiskLevel,
}
Expand description
Security analysis result for Unicode text
Fields§
§has_invisible_chars: bool
Contains invisible or zero-width characters
has_bidi_overrides: bool
Contains bidirectional override characters
has_mixed_scripts: bool
Contains mixed scripts (potential homograph attack)
has_confusables: bool
Contains confusable characters
invisible_chars: Vec<(usize, char, &'static str)>
List of detected invisible characters with their positions
bidi_chars: Vec<(usize, char, &'static str)>
List of detected bidirectional characters with their positions
scripts: HashSet<Script>
Set of detected scripts
risk_level: RiskLevel
Overall risk level
Trait Implementations§
Source§impl Clone for SecurityAnalysis
impl Clone for SecurityAnalysis
Source§fn clone(&self) -> SecurityAnalysis
fn clone(&self) -> SecurityAnalysis
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SecurityAnalysis
impl Debug for SecurityAnalysis
Source§impl PartialEq for SecurityAnalysis
impl PartialEq for SecurityAnalysis
impl Eq for SecurityAnalysis
impl StructuralPartialEq for SecurityAnalysis
Auto Trait Implementations§
impl Freeze for SecurityAnalysis
impl RefUnwindSafe for SecurityAnalysis
impl Send for SecurityAnalysis
impl Sync for SecurityAnalysis
impl Unpin for SecurityAnalysis
impl UnwindSafe for SecurityAnalysis
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