22 lines
419 B
Rust
22 lines
419 B
Rust
pub struct LeafEnumBuildSpec {
|
|
build: String,
|
|
rules: Vec<String>,
|
|
}
|
|
|
|
impl LeafEnumBuildSpec {
|
|
pub fn new(build: &str, rules: Vec<String>) -> Self {
|
|
Self {
|
|
build: build.to_string(),
|
|
rules,
|
|
}
|
|
}
|
|
|
|
pub fn build(&self) -> &str {
|
|
&self.build
|
|
}
|
|
|
|
pub fn rules(&self) -> impl Iterator<Item = &str> {
|
|
self.rules.iter().map(AsRef::as_ref)
|
|
}
|
|
}
|