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 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>
§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
.
Trait Implementations§
Source§impl Clone for GpuCounterSpec
impl Clone for GpuCounterSpec
Source§fn clone(&self) -> GpuCounterSpec
fn clone(&self) -> GpuCounterSpec
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 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
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for GpuCounterSpec
impl PartialEq for GpuCounterSpec
impl StructuralPartialEq for GpuCounterSpec
Auto Trait Implementations§
impl Freeze for GpuCounterSpec
impl RefUnwindSafe for GpuCounterSpec
impl Send for GpuCounterSpec
impl Sync for GpuCounterSpec
impl Unpin for GpuCounterSpec
impl UnwindSafe for GpuCounterSpec
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