You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement Bytes on IoMemory instead of GuestMemory
Rust only allows us to give one trait the blanket implementations for
`Bytes`.
We want `IoMemory` to be our primary external interface becaue it has
users specify the access permissions they need, and because we can (and
do) provide a blanket `IoMemory` implementation for all `GuestMemory`
types. Also, while `IoMemory` (as the more general trait) only has a
restricted interface when compared to `GuestMemory`, this interface is
enough to implement `Bytes`; notably, accesses to `IoMemory` require
specifying the access mode, which is naturally trivial for `Bytes`
methods like `read()` or `write()`.
Signed-off-by: Hanna Czenczek <[email protected]>
0 commit comments