pub struct CounterSet {
pub counters: BTreeMap<String, Counter>,
pub name: String,
}
Expand description
CounterSet defines a named set of counters that are available to be used by devices defined in the ResourceSlice.
The counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.
Fields§
§counters: BTreeMap<String, Counter>
Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label.
The maximum number of counters is 32.
name: String
Name defines the name of the counter set. It must be a DNS label.
Trait Implementations§
Source§impl Clone for CounterSet
impl Clone for CounterSet
Source§fn clone(&self) -> CounterSet
fn clone(&self) -> CounterSet
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 CounterSet
impl Debug for CounterSet
Source§impl DeepMerge for CounterSet
impl DeepMerge for CounterSet
Source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
Merge
other
into self
.Source§impl Default for CounterSet
impl Default for CounterSet
Source§fn default() -> CounterSet
fn default() -> CounterSet
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CounterSet
impl<'de> Deserialize<'de> for CounterSet
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 CounterSet
impl PartialEq for CounterSet
Source§impl Serialize for CounterSet
impl Serialize for CounterSet
impl StructuralPartialEq for CounterSet
Auto Trait Implementations§
impl Freeze for CounterSet
impl RefUnwindSafe for CounterSet
impl Send for CounterSet
impl Sync for CounterSet
impl Unpin for CounterSet
impl UnwindSafe for CounterSet
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