Struct yy_typings::utils::ResourceNameValidator [−][src]
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
impl ResourceNameValidator
[src]
pub fn new() -> ResourceNameValidator
[src]
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
.
pub fn is_valid(&self, input: &str) -> bool
[src]
Checks if the path given is a valid name for Gms2 Resources.
pub fn validate_path_once(input: &str) -> bool
[src]
Checks if path is a valid name for Gms2 Resources. It is relatively inefficent, and does one allocations per call.
Trait Implementations
impl Clone for ResourceNameValidator
[src]
fn clone(&self) -> ResourceNameValidator
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ResourceNameValidator
[src]
impl Default for ResourceNameValidator
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,