pub struct PveUsbConfig {
pub host: Option<String>,
pub mapping: Option<String>,
pub usb3: Option<PveBoolean>,
}Fields§
§host: Option<String>The Host USB device or port or the value ‘spice’. HOSTUSBDEVICE syntax is: ‘bus-port(.port)*’ (decimal numbers) or ‘vendor_id:product_id’ (hexadecimal numbers) or ‘spice’ You can use the ‘lsusb -t’ command to list existing usb devices. NOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care. The value ‘spice’ can be used to add a usb redirection devices for spice. Either this or the ‘mapping’ key must be set.
mapping: Option<String>The ID of a cluster wide mapping. Either this or the default-key ‘host’ must be set.
usb3: Option<PveBoolean>Specifies whether if given host option is a USB3 device or port. For modern guests (machine version >= 7.1 and ostype l26 and windows > 7), this flag is irrelevant (all devices are plugged into a xhci controller).
Implementations§
Source§impl PveUsbConfig
impl PveUsbConfig
pub fn new() -> PveUsbConfig
Source§impl PveUsbConfig
impl PveUsbConfig
Sourcepub fn to_shorthand(&self) -> String
pub fn to_shorthand(&self) -> String
Serialise this PveUsbConfig into Proxmox’s CLI-style shorthand
string (key=value,…). The property marked x-pve-default-key
is emitted positionally without a key= prefix; aliases collapse
multiple property names to the same wire key.
Example: PveUsbConfig
→ "virtio,bridge=vmbr0"
Trait Implementations§
Source§impl Clone for PveUsbConfig
impl Clone for PveUsbConfig
Source§fn clone(&self) -> PveUsbConfig
fn clone(&self) -> PveUsbConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PveUsbConfig
impl Debug for PveUsbConfig
Source§impl Default for PveUsbConfig
impl Default for PveUsbConfig
Source§fn default() -> PveUsbConfig
fn default() -> PveUsbConfig
Source§impl<'de> Deserialize<'de> for PveUsbConfig
impl<'de> Deserialize<'de> for PveUsbConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PveUsbConfig
impl PartialEq for PveUsbConfig
Source§fn eq(&self, other: &PveUsbConfig) -> bool
fn eq(&self, other: &PveUsbConfig) -> bool
self and other values to be equal, and is used by ==.