pub fn parse_host_pattern(pattern: &str) -> Result<HostPattern, HostlistError>Expand description
Parse a host pattern string into a HostPattern structure
§Arguments
pattern- The host pattern string to parse
§Returns
A parsed HostPattern structure or an error.
§Examples
use bssh::hostlist::parse_host_pattern;
let pattern = parse_host_pattern("node[1-3]").unwrap();
assert!(pattern.has_ranges());
assert_eq!(pattern.expansion_count(), 3);