pub fn create_net_device<F, T>(
    protection_type: ProtectionType,
    jail_config: &Option<JailConfig>,
    vq_pairs: u16,
    vcpu_count: usize,
    policy: &str,
    create_device: F
) -> Result<VirtioDeviceStub>where
    F: FnOnce(u64, u16) -> Result<T>,
    T: VirtioDevice + 'static,
Expand description

Generic method for creating a network device. create_device is a closure that takes the virtio features and number of queue pairs as parameters, and is responsible for creating the device itself.