> `Io` trait now has a single required methods with many more provided > methods. Provided methods may want to rely on their implementations to not > be arbitrarily overridden by implementers for correctness or soundness. > > Thus, extract these methods to a new trait and provide a blanket > implementation. This pattern is used extensively in userspace Rust > libraries e.g. `tokio` where `AsyncRead` has minimum methods and > `AsyncReadExt` is what users mostly interact with. > > To avoid changing all user imports, the base trait is renamed to `IoBase` > and the newly added trait takes the existing `Io` name. > > A `size` method is added as an example of methods that users should not > override. > > Suggested-by: Danilo Krummrich <[email protected]> > Signed-off-by: Gary Guo <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=11
