Re: [PATCH 06/11] rust/block: Add I/O buffer traits

2025-02-12 Thread Paolo Bonzini
Il mer 12 feb 2025, 18:23 Kevin Wolf ha scritto: > Am 12.02.2025 um 17:48 hat Paolo Bonzini geschrieben: > > On 2/11/25 22:43, Kevin Wolf wrote: > > > +/// Implementing `SizedIoBuffer` provides an implementation for > [`IoBuffer`] without having to > > > +/// implement any functions manually. > >

Re: [PATCH 06/11] rust/block: Add I/O buffer traits

2025-02-12 Thread Kevin Wolf
Am 12.02.2025 um 17:48 hat Paolo Bonzini geschrieben: > On 2/11/25 22:43, Kevin Wolf wrote: > > +/// Implementing `SizedIoBuffer` provides an implementation for > > [`IoBuffer`] without having to > > +/// implement any functions manually. > > +/// > > +/// # Safety > > +/// > > +/// Types implemen

Re: [PATCH 06/11] rust/block: Add I/O buffer traits

2025-02-12 Thread Paolo Bonzini
On 2/11/25 22:43, Kevin Wolf wrote: +/// Implementing `SizedIoBuffer` provides an implementation for [`IoBuffer`] without having to +/// implement any functions manually. +/// +/// # Safety +/// +/// Types implementing `SizedIoBuffer` guarantee that the whole object can be accessed as an I/O +/

[PATCH 06/11] rust/block: Add I/O buffer traits

2025-02-11 Thread Kevin Wolf
Types that implement IoBuffer can be used with safe I/O functions. Signed-off-by: Kevin Wolf --- rust/block/src/iobuffer.rs | 94 ++ rust/block/src/lib.rs | 2 + 2 files changed, 96 insertions(+) create mode 100644 rust/block/src/iobuffer.rs diff --git