pub enum VendorDeviceModule {
Unsupported,
}Expand description
Replace the “Unsupported” variant in downstream crate with the available platform devices
Variants§
Unsupported
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VendorDeviceModule
impl<'de> Deserialize<'de> for VendorDeviceModule
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromArgValue for VendorDeviceModule
Receives a string identifier from the command line and returns the corresponding module
if it exists.
Example implementation:
match value {
“mydev” => Ok(VendorDeviceModule::MyDevice(MyDeviceModule)),
_ => Err(format!(“unknown vendor device: {value}”)),
}
impl FromArgValue for VendorDeviceModule
Receives a string identifier from the command line and returns the corresponding module if it exists. Example implementation: match value { “mydev” => Ok(VendorDeviceModule::MyDevice(MyDeviceModule)), _ => Err(format!(“unknown vendor device: {value}”)), }
Source§impl Serialize for VendorDeviceModule
impl Serialize for VendorDeviceModule
Source§impl VirtioDeviceModule for VendorDeviceModule
impl VirtioDeviceModule for VendorDeviceModule
Source§fn create(
&self,
_cx: &mut VirtioDeviceArgs<'_>,
) -> Result<Box<dyn VirtioDevice>>
fn create( &self, _cx: &mut VirtioDeviceArgs<'_>, ) -> Result<Box<dyn VirtioDevice>>
The trait methods should match against the VendorDeviceModule variants and dispatch to the module implementation: match self { Self::MyDeviceA(m) => m.create(cx), Self::MyDeviceB(m) => m.create(cx), }
Source§fn sort_name(&self) -> &'static str
fn sort_name(&self) -> &'static str
Name of the device used to determine init processing order.
Source§fn create_jail(
&self,
_jail_config: Option<&JailConfig>,
) -> Result<Option<Minijail>>
fn create_jail( &self, _jail_config: Option<&JailConfig>, ) -> Result<Option<Minijail>>
Optionally create a jail for this device.
Auto Trait Implementations§
impl Freeze for VendorDeviceModule
impl RefUnwindSafe for VendorDeviceModule
impl Send for VendorDeviceModule
impl Sync for VendorDeviceModule
impl Unpin for VendorDeviceModule
impl UnwindSafe for VendorDeviceModule
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