Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub fn valid_scan_name(s: &str) -> bool {
    if s.is_empty() {
        return false;
    }

    s.chars().all(|c| c.is_ascii_alphanumeric() || c == '_')
}

pub fn valid_workflow_var_key(s: &str) -> bool {
    if s.is_empty() {
        return false;
    }

    s.chars()
        .all(|c| c.is_ascii_alphanumeric() || c == '_' || c == '-')
}