Re: [PATCH v6 RESEND 4/7] rust: io: factor common I/O helpers into Io trait

From: Zhi Wang
Date: Mon Nov 17 2025 - 12:21:52 EST


On Fri, 14 Nov 2025 13:53:01 -0500
Tamir Duberstein <tamird@xxxxxxxxx> wrote:

> On Fri, Nov 14, 2025 at 12:37 PM Zhi Wang <zhiw@xxxxxxxxxx> wrote:
> >

snip

>
> What about using an associated Err type? In the infallible case, it
> would be `core::convert::Infallible`. It would be slightly more
> ergonomic if associated type defaults were stable[0], though.
>
> [0] https://github.com/rust-lang/rust/issues/29661

Thanks, Tamir. From Alice's and Danilo’s discussion, it seems we’ll keep
the fallible and infallible traits separate for now.

Still, I really like the idea of an associated Err type. Thanks for the
trick. :)

Z.