pub struct FvmInstance { /* private fields */ }
Expand description
This structs holds processes of component manager, isolated-devmgr and the fvm driver.
NOTE: The order of fields in this struct is important. Destruction happens top-down. Test must be destroyed last.
Implementations§
Source§impl FvmInstance
impl FvmInstance
Sourcepub async fn new(
init: bool,
vmo: &Vmo,
fvm_slice_size: u64,
ramdisk_block_size: u64,
) -> Self
pub async fn new( init: bool, vmo: &Vmo, fvm_slice_size: u64, ramdisk_block_size: u64, ) -> Self
Start an isolated FVM driver against the given VMO.
If init
is true, initialize the VMO with FVM layout first.
Sourcepub async fn new_volume(
&mut self,
name: &str,
type_guid: &Guid,
initial_volume_size: Option<u64>,
) -> Guid
pub async fn new_volume( &mut self, name: &str, type_guid: &Guid, initial_volume_size: Option<u64>, ) -> Guid
Create a new FVM volume with the given name and type GUID. Returns the instance GUID used to uniquely identify this volume.
Sourcepub async fn free_space(&self) -> u64
pub async fn free_space(&self) -> u64
Returns the number of bytes the FVM partition has available.
Sourcepub fn ramdisk_get_dir(&self) -> Option<&DirectoryProxy>
pub fn ramdisk_get_dir(&self) -> Option<&DirectoryProxy>
Returns a reference to the ramdisk DirectoryProxy.
Auto Trait Implementations§
impl Freeze for FvmInstance
impl !RefUnwindSafe for FvmInstance
impl Send for FvmInstance
impl Sync for FvmInstance
impl Unpin for FvmInstance
impl !UnwindSafe for FvmInstance
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