pub enum Device {
CPU,
GPU {
uuid: Option<String>,
},
}
Expand description
Supported device types
Variants§
Implementations§
source§impl Device
impl Device
pub fn maybe_from_str(s: &str) -> Result<Self>
pub fn maybe_from_index(i: u32) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Device
impl<'de> Deserialize<'de> for Device
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
Auto Trait Implementations§
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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