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 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 GpuCounterSpec
impl Debug for GpuCounterSpec
Source§impl Default for GpuCounterSpec
impl Default for GpuCounterSpec
Source§fn default() -> GpuCounterSpec
fn default() -> GpuCounterSpec
Returns the “default value” for a type. Read more
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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].