pub struct RequestedDevice {
pub name: String,
pub count: Option<u64>,
pub constraints: Vec<Constraint>,
pub affinities: Vec<Affinity>,
}
Expand description
RequestedDevice is used to request a device for a task.
This struct was generated based on the Go types of the official Nomad API client.
Fields§
§name: String
Name is the request name. The possible values are as follows:
: A single value only specifies the type of request. / : A single slash delimiter assumes the vendor and type of device is specified. / / : Two slash delimiters assume vendor, type and specific model are specified.
Examples are as follows:
- “gpu”
- “nvidia/gpu”
- “nvidia/gpu/GTX2080Ti”
count: Option<u64>
Count is the number of requested devices
constraints: Vec<Constraint>
Constraints are a set of constraints to apply when selecting the device to use.
affinities: Vec<Affinity>
Affinities are a set of affinites to apply when selecting the device to use.
Implementations§
Source§impl RequestedDevice
impl RequestedDevice
pub fn builder() -> RequestedDeviceBuilder
Trait Implementations§
Source§impl Clone for RequestedDevice
impl Clone for RequestedDevice
Source§fn clone(&self) -> RequestedDevice
fn clone(&self) -> RequestedDevice
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RequestedDevice
impl Debug for RequestedDevice
Source§impl<'de> Deserialize<'de> for RequestedDevice
impl<'de> Deserialize<'de> for RequestedDevice
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 PartialEq for RequestedDevice
impl PartialEq for RequestedDevice
Source§impl Serialize for RequestedDevice
impl Serialize for RequestedDevice
impl StructuralPartialEq for RequestedDevice
Auto Trait Implementations§
impl Freeze for RequestedDevice
impl RefUnwindSafe for RequestedDevice
impl Send for RequestedDevice
impl Sync for RequestedDevice
impl Unpin for RequestedDevice
impl UnwindSafe for RequestedDevice
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