pub struct VariableNameRules {
pub reserved_names: &'static [&'static str],
pub reserved_prefixes: &'static [&'static str],
}Expand description
The names a forge refuses for Actions variables, beyond the shared shape.
Fields§
§reserved_names: &'static [&'static str]Names that are reserved in any letter case.
reserved_prefixes: &'static [&'static str]Prefixes that are reserved in any letter case.
Implementations§
Source§impl VariableNameRules
impl VariableNameRules
Sourcepub fn is_valid(&self, name: &str) -> bool
pub fn is_valid(&self, name: &str) -> bool
Whether name is acceptable.
A name has letters, digits and underscores and does not start with a digit. It is not reserved.
Sourcepub fn check<'a, I: IntoIterator<Item = &'a str>>(
&self,
names: I,
) -> Result<(), VariableNameError>
pub fn check<'a, I: IntoIterator<Item = &'a str>>( &self, names: I, ) -> Result<(), VariableNameError>
Check the names of one scope, which forges store in upper case.
§Errors
Returns the first invalid name, or the first name that differs only in letter case from an earlier one.
Trait Implementations§
Source§impl Clone for VariableNameRules
impl Clone for VariableNameRules
Source§fn clone(&self) -> VariableNameRules
fn clone(&self) -> VariableNameRules
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VariableNameRules
Auto Trait Implementations§
impl Freeze for VariableNameRules
impl RefUnwindSafe for VariableNameRules
impl Send for VariableNameRules
impl Sync for VariableNameRules
impl Unpin for VariableNameRules
impl UnsafeUnpin for VariableNameRules
impl UnwindSafe for VariableNameRules
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