Trait Parameter
Define a trait Describe with a method describe(&self) -> String. Implement it for Planet (with a name: String field). Write a function print_info that takes &impl Describe and prints the description. Test it with planet "Mars".
Expected output:
text
Planet: Mars
Hints:
fn print_info(item: &impl Describe)accepts any type withDescribe- The
describemethod should returnformat!("Planet: {}", self.name)
rust
fn main() {
}