pub struct RequestedDeviceBuilder { /* private fields */ }
Expand description
Builder for RequestedDevice
.
Implementations§
Source§impl RequestedDeviceBuilder
impl RequestedDeviceBuilder
Sourcepub fn name(&mut self, value: String) -> &mut Self
pub fn name(&mut self, value: String) -> &mut Self
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”
Sourcepub fn count(&mut self, value: Option<u64>) -> &mut Self
pub fn count(&mut self, value: Option<u64>) -> &mut Self
Count is the number of requested devices
Sourcepub fn constraints(&mut self, value: Vec<Constraint>) -> &mut Self
pub fn constraints(&mut self, value: Vec<Constraint>) -> &mut Self
Constraints are a set of constraints to apply when selecting the device to use.
Sourcepub fn affinities(&mut self, value: Vec<Affinity>) -> &mut Self
pub fn affinities(&mut self, value: Vec<Affinity>) -> &mut Self
Affinities are a set of affinites to apply when selecting the device to use.
Sourcepub fn build(&self) -> Result<RequestedDevice, RequestedDeviceBuilderError>
pub fn build(&self) -> Result<RequestedDevice, RequestedDeviceBuilderError>
Trait Implementations§
Source§impl Clone for RequestedDeviceBuilder
impl Clone for RequestedDeviceBuilder
Source§fn clone(&self) -> RequestedDeviceBuilder
fn clone(&self) -> RequestedDeviceBuilder
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for RequestedDeviceBuilder
impl RefUnwindSafe for RequestedDeviceBuilder
impl Send for RequestedDeviceBuilder
impl Sync for RequestedDeviceBuilder
impl Unpin for RequestedDeviceBuilder
impl UnwindSafe for RequestedDeviceBuilder
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