pub struct GpuCounterSpec {
pub counter_id: Option<u32>,
pub name: Option<String>,
pub description: Option<String>,
pub numerator_units: Vec<i32>,
pub denominator_units: Vec<i32>,
pub select_by_default: Option<bool>,
pub groups: Vec<i32>,
pub value_direction: Option<i32>,
pub peak_value: Option<PeakValue>,
}Fields§
§counter_id: Option<u32>§name: Option<String>§description: Option<String>§numerator_units: Vec<i32>§denominator_units: Vec<i32>§select_by_default: Option<bool>§groups: Vec<i32>§value_direction: Option<i32>§peak_value: Option<PeakValue>Implementations§
Source§impl GpuCounterSpec
impl GpuCounterSpec
Sourcepub fn counter_id(&self) -> u32
pub fn counter_id(&self) -> u32
Returns the value of counter_id, or the default value if counter_id is unset.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description, or the default value if description is unset.
Sourcepub fn numerator_units(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<MeasureUnit>>
pub fn numerator_units( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<MeasureUnit>>
Returns an iterator which yields the valid enum values contained in numerator_units.
Sourcepub fn push_numerator_units(&mut self, value: MeasureUnit)
pub fn push_numerator_units(&mut self, value: MeasureUnit)
Appends the provided enum value to numerator_units.
Sourcepub fn denominator_units(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<MeasureUnit>>
pub fn denominator_units( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<MeasureUnit>>
Returns an iterator which yields the valid enum values contained in denominator_units.
Sourcepub fn push_denominator_units(&mut self, value: MeasureUnit)
pub fn push_denominator_units(&mut self, value: MeasureUnit)
Appends the provided enum value to denominator_units.
Sourcepub fn select_by_default(&self) -> bool
pub fn select_by_default(&self) -> bool
Returns the value of select_by_default, or the default value if select_by_default is unset.
Sourcepub fn groups(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<GpuCounterGroup>>
pub fn groups( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<GpuCounterGroup>>
Returns an iterator which yields the valid enum values contained in groups.
Sourcepub fn push_groups(&mut self, value: GpuCounterGroup)
pub fn push_groups(&mut self, value: GpuCounterGroup)
Appends the provided enum value to groups.
Sourcepub fn value_direction(&self) -> ValueDirection
pub fn value_direction(&self) -> ValueDirection
Returns the enum value of value_direction, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_value_direction(&mut self, value: ValueDirection)
pub fn set_value_direction(&mut self, value: ValueDirection)
Sets value_direction to the provided enum value.
Trait Implementations§
Source§impl Clone for GpuCounterSpec
impl Clone for GpuCounterSpec
Source§fn clone(&self) -> GpuCounterSpec
fn clone(&self) -> GpuCounterSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GpuCounterSpec
impl Debug for GpuCounterSpec
Source§impl Default for GpuCounterSpec
impl Default for GpuCounterSpec
Source§impl Message for GpuCounterSpec
impl Message for GpuCounterSpec
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self.Source§impl PartialEq for GpuCounterSpec
impl PartialEq for GpuCounterSpec
Source§fn eq(&self, other: &GpuCounterSpec) -> bool
fn eq(&self, other: &GpuCounterSpec) -> bool
self and other values to be equal, and is used by ==.