pub mod healthy_food{
pub mod fruits{
#[derive(Debug)]
pub enum Fruit{
Mango,
Banana,
Apple,
}
}
pub mod vegetables{
pub struct Vegetable{
pub Name: String,
pub IsSeasonal: bool
}
impl Vegetable {
pub fn print_vegetable(&self){
println!("I have selected {} and it is {}.", self.Name, check_seasonal(self.IsSeasonal));
}
}
pub fn check_seasonal(is_seasonal:bool) -> String{
if is_seasonal {
"seasonal".to_string()
}else{
"non-seasonal".to_string()
}
}
}
}