Struct ramdevice_client::RamdiskClientBuilder
source · pub struct RamdiskClientBuilder { /* private fields */ }
Expand description
A type to help construct a [RamdeviceClient
] optionally from a VMO.
Implementations§
source§impl RamdiskClientBuilder
impl RamdiskClientBuilder
sourcepub fn new_with_vmo(vmo: Vmo, block_size: Option<u64>) -> Self
pub fn new_with_vmo(vmo: Vmo, block_size: Option<u64>) -> Self
Create a new ramdisk builder with a vmo
sourcepub fn dev_root(self, dev_root: DirectoryProxy) -> Self
pub fn dev_root(self, dev_root: DirectoryProxy) -> Self
Use the given directory as “/dev” instead of opening “/dev” from the environment.
sourcepub fn guid(self, guid: [u8; 16]) -> Self
pub fn guid(self, guid: [u8; 16]) -> Self
Initialize the ramdisk with the given GUID, which can be queried from the ramdisk instance.
sourcepub async fn build(self) -> Result<RamdiskClient, Error>
pub async fn build(self) -> Result<RamdiskClient, Error>
Create the ramdisk.