[][src]Function vblk::mount

pub unsafe fn mount<P: AsRef<Path>>(
    device: &mut dyn BlockDevice,
    path: P,
    callback: impl FnOnce(Device) -> Result<()>
) -> Result<()>

Mounts a block device on an NBD device such as /dev/nbd0.

The callback will be invoked at the start of the mounting process and will yield a structure which can be used to asynchronously unmount this device.

Safety

Communicates with the NBD kernel module through ioctls.