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§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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.