What is meant by they dyn keyword?

I am learning from an online course, and my comprehension of the language has taken a nose dive. What is going on here in this main function spec:

fn main() -> Result <(), Box<dyn Error>> {
}

I am closing out the course and this came up and was never explained before the exercise.

dyn Trait is called Trait object types - The Rust Reference , an erased type.

And this is the best tutorial about dyn Trait you should never miss: A tour of dyn Trait

7 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.