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
Pointers to VmIo, e.g., &Vmar, Box<Mmio>, and Arc<Vmo>, should also be considered as VmIo. This can be achieved by providing the following blanket implementations for Vmio trait.
// Need to import inherit_methods_macro crate from Occlum.// https://github.com/occlum/occlum/tree/1.0.0-preview/src/libos/crates/inherit-methods-macrouse inherit_methods_macro::inherit_methods;#[inherit_methods(from = "(**self)")]impl<T:Vmio>Vmiofor&T{fnread_bytes(&self,offset:usize,buf:&mut[u8]) -> Result<()>;fnread_val<T:Pod>(&self,offset:usize) -> Result<T>;fnread_slice<T:Pod>(&self,offset:usize,slice:&mut[T]) -> Result<()>;fnwrite_bytes(&self,offset:usize,buf:&[u8]) -> Result<()>;fnwrite_val<T:Pod>(&self,offset:usize,new_val:&T) -> Result<()>;fnwrite_slice<T:Pod>(&self,offset:usize,slice:&[T]) -> Result<()>;}// Need to add the following blanket implementations for Vmio#[inherit_methods(from = "(**self)")]impl<T:Vmio>Vmiofor&mutT{fnread_bytes(&self,offset:usize,buf:&mut[u8]) -> Result<()>;fnread_val<T:Pod>(&self,offset:usize) -> Result<T>;fnread_slice<T:Pod>(&self,offset:usize,slice:&mut[T]) -> Result<()>;fnwrite_bytes(&self,offset:usize,buf:&[u8]) -> Result<()>;fnwrite_val<T:Pod>(&self,offset:usize,new_val:&T) -> Result<()>;fnwrite_slice<T:Pod>(&self,offset:usize,slice:&[T]) -> Result<()>;}// Need to add the following blanket implementations for Vmio#[inherit_methods(from = "(**self)")]impl<T:Vmio>VmioforBox<T>{fnread_bytes(&self,offset:usize,buf:&mut[u8]) -> Result<()>;fnread_val<T:Pod>(&self,offset:usize) -> Result<T>;fnread_slice<T:Pod>(&self,offset:usize,slice:&mut[T]) -> Result<()>;fnwrite_bytes(&self,offset:usize,buf:&[u8]) -> Result<()>;fnwrite_val<T:Pod>(&self,offset:usize,new_val:&T) -> Result<()>;fnwrite_slice<T:Pod>(&self,offset:usize,slice:&[T]) -> Result<()>;}// Need to add the following blanket implementations for Vmio#[inherit_methods(from = "(**self)")]impl<T:Vmio>VmioforArc<T>{fnread_bytes(&self,offset:usize,buf:&mut[u8]) -> Result<()>;fnread_val<T:Pod>(&self,offset:usize) -> Result<T>;fnread_slice<T:Pod>(&self,offset:usize,slice:&mut[T]) -> Result<()>;fnwrite_bytes(&self,offset:usize,buf:&[u8]) -> Result<()>;fnwrite_val<T:Pod>(&self,offset:usize,new_val:&T) -> Result<()>;fnwrite_slice<T:Pod>(&self,offset:usize,slice:&[T]) -> Result<()>;}
The text was updated successfully, but these errors were encountered:
Pointers to
VmIo
, e.g.,&Vmar
,Box<Mmio>
, andArc<Vmo>
, should also be considered asVmIo
. This can be achieved by providing the following blanket implementations forVmio
trait.The text was updated successfully, but these errors were encountered: