Struct yy_typings::utils::ResourceNameValidator [−][src]
pub struct ResourceNameValidator { /* fields omitted */ }
Expand description
Provides validation services for Gms2 Resource Names by running the Regex
of r"[A-z_]\w+"
over the input. For those who don’t speak Regex, it passes
for any input which contains only A-z
, _
, or 0-9
and which does not
begin with 0-9
.
Passes:
spr_player
_abc
_a12bc
Fails:
0123abc
9_
5
Implementations
Create a new PathValidator
, and initialize its regex. Use this
stateful struct if you are going to be validating multiple paths. If
only validating one path, feel free to use
PathValidator::validate_path_once
.
Checks if the path given is a valid name for Gms2 Resources.
Checks if path is a valid name for Gms2 Resources. It is relatively inefficent, and does one allocations per call.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ResourceNameValidator
impl Send for ResourceNameValidator
impl Sync for ResourceNameValidator
impl Unpin for ResourceNameValidator
impl UnwindSafe for ResourceNameValidator
Blanket Implementations
Mutably borrows from an owned value. Read more