pub struct MockGuestFsOps { /* private fields */ }Expand description
In-memory GuestFsOps for unit tests (no VM).
Implementations§
Trait Implementations§
Source§impl Debug for MockGuestFsOps
impl Debug for MockGuestFsOps
Source§impl Default for MockGuestFsOps
impl Default for MockGuestFsOps
Source§fn default() -> MockGuestFsOps
fn default() -> MockGuestFsOps
Returns the “default value” for a type. Read more
Source§impl GuestFsOps for MockGuestFsOps
impl GuestFsOps for MockGuestFsOps
Source§fn list_dir(&mut self, guest_path: &str) -> Result<Vec<String>, GuestFsError>
fn list_dir(&mut self, guest_path: &str) -> Result<Vec<String>, GuestFsError>
List non-hidden names in
guest_path (like ls -1A).Source§fn read_file(&mut self, guest_path: &str) -> Result<Vec<u8>, GuestFsError>
fn read_file(&mut self, guest_path: &str) -> Result<Vec<u8>, GuestFsError>
Read a file by guest path.
Source§fn write_file(
&mut self,
guest_path: &str,
data: &[u8],
) -> Result<(), GuestFsError>
fn write_file( &mut self, guest_path: &str, data: &[u8], ) -> Result<(), GuestFsError>
Write or replace a file.
Auto Trait Implementations§
impl Freeze for MockGuestFsOps
impl RefUnwindSafe for MockGuestFsOps
impl Send for MockGuestFsOps
impl Sync for MockGuestFsOps
impl Unpin for MockGuestFsOps
impl UnsafeUnpin for MockGuestFsOps
impl UnwindSafe for MockGuestFsOps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more