Trait RestrictionLevelDetection

Source
pub trait RestrictionLevelDetection: Sized {
    // Required method
    fn detect_restriction_level(self) -> RestrictionLevel;

    // Provided method
    fn check_restriction_level(self, level: RestrictionLevel) -> bool { ... }
}
Expand description

Utilities for determining which restriction level a string satisfies

Required Methods§

Source

fn detect_restriction_level(self) -> RestrictionLevel

Detect the restriction level

This will not check identifier well-formedness, as different applications may have different notions of well-formedness

Provided Methods§

Source

fn check_restriction_level(self, level: RestrictionLevel) -> bool

Check if a string satisfies the supplied restriction level

This will not check identifier well-formedness, as different applications may have different notions of well-formedness

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RestrictionLevelDetection for &str

Implementors§