pub struct DeviceCapacity {
pub request_policy: Option<CapacityRequestPolicy>,
pub value: Quantity,
}
Expand description
DeviceCapacity describes a quantity associated with a device.
Fields§
§request_policy: Option<CapacityRequestPolicy>
RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.
The Device must have allowMultipleAllocations set to true in order to set a requestPolicy.
If unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device’s defined capacity. If request is also unset, default is the full capacity value.
value: Quantity
Value defines how much of a certain capacity that device has.
This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.
Trait Implementations§
Source§impl Clone for DeviceCapacity
impl Clone for DeviceCapacity
Source§fn clone(&self) -> DeviceCapacity
fn clone(&self) -> DeviceCapacity
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 moreSource§impl Debug for DeviceCapacity
impl Debug for DeviceCapacity
Source§impl DeepMerge for DeviceCapacity
impl DeepMerge for DeviceCapacity
Source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
Merge
other
into self
.Source§impl Default for DeviceCapacity
impl Default for DeviceCapacity
Source§fn default() -> DeviceCapacity
fn default() -> DeviceCapacity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceCapacity
impl<'de> Deserialize<'de> for DeviceCapacity
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 DeviceCapacity
impl PartialEq for DeviceCapacity
Source§impl Serialize for DeviceCapacity
impl Serialize for DeviceCapacity
impl StructuralPartialEq for DeviceCapacity
Auto Trait Implementations§
impl Freeze for DeviceCapacity
impl RefUnwindSafe for DeviceCapacity
impl Send for DeviceCapacity
impl Sync for DeviceCapacity
impl Unpin for DeviceCapacity
impl UnwindSafe for DeviceCapacity
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