2 ms·
It's because Writer (the trait write_all() is from) is implemented on IoResult. http://doc.rust-lang.org/std/old_io/trait.Writer.html#tymethod.write_all http:/
by steveklabnik 12y ago
It's because Writer (the trait write_all() is from) is implemented on IoResult. http://doc.rust-lang.org/std/old_io/trait.Writer.html#tymethod.write_all http://doc.rust-lang.org/std/old_io/trait.Writer.html#tymeth...
impl<W: Writer> Writer for IoResult<W>
From the `std::old_io` docs: http://doc.rust-lang.org/std/old_io/index.html http://doc.rust-lang.org/std/old_io/index.html
> Common traits are implemented for IoResult, e.g. impl<R: Reader> Reader
> for IoResult<R>, so that error values do not have to be 'unwrapped' before use.
- kaoD 12y agoAh, remote implementation of traits bites me once again. Is there any reason behind not listing the implemented traits in IoResult's docs? Listing the implementors in the trait is not very useful since in the first place you have to know which traits are implemented to consult them. It's backwards and counterintuitive as I see it.
- steveklabnik 12y agoIn general, we're still working on a number of usability issues with Rustdoc's output. The one that bits the most people is methods through Deref. Luckily, this is just a tooling issue, a small bug to be fixed, rather than some sort of fundamental problem. The beta cycle is going to be all about polish, and issues like this are a good candidate for that kind of work.