How to find out in rust docs if trait provides default implementations of methods

Hello folks,

I'd like to know, how from the Rust docs I can know if trait has default implementations of its methods without having to take a look to its source.

One example is the Error trait, source method has a default implementation.

Thank you!

Methods that have a default implementation have their signatures followed by { ... } in the code block at the top of the docs page; methods without default implementations have their signatures followed by ;. In the case of Error all the methods have default implementations, but you can see an example with both defaulted and non-defaulted methods at Extend.

2 Likes

Everything under
image
has a default implementation.

As opposed to
image
like Iterator::next.

4 Likes

Thanks to both!

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.