#[repr(i32)]pub enum MeasurementSelectionType {
Unspecified = 0,
LastMeasurement = 1,
BestMeasurement = 2,
}
Expand description
This indicates which measurement to use if/when the service automatically selects the final measurement from previously reported intermediate measurements. Choose this based on two considerations: A) Do you expect your measurements to monotonically improve? If so, choose LAST_MEASUREMENT. On the other hand, if you’re in a situation where your system can “over-train” and you expect the performance to get better for a while but then start declining, choose BEST_MEASUREMENT. B) Are your measurements significantly noisy and/or irreproducible? If so, BEST_MEASUREMENT will tend to be over-optimistic, and it may be better to choose LAST_MEASUREMENT. If both or neither of (A) and (B) apply, it doesn’t matter which selection type is chosen.
Variants§
Unspecified = 0
Will be treated as LAST_MEASUREMENT.
LastMeasurement = 1
Use the last measurement reported.
BestMeasurement = 2
Use the best measurement reported.
Implementations§
source§impl MeasurementSelectionType
impl MeasurementSelectionType
sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of MeasurementSelectionType
.
sourcepub fn from_i32(value: i32) -> Option<MeasurementSelectionType>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<MeasurementSelectionType>
Converts an i32
to a MeasurementSelectionType
, or None
if value
is not a valid variant.
source§impl MeasurementSelectionType
impl MeasurementSelectionType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for MeasurementSelectionType
impl Clone for MeasurementSelectionType
source§fn clone(&self) -> MeasurementSelectionType
fn clone(&self) -> MeasurementSelectionType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MeasurementSelectionType
impl Debug for MeasurementSelectionType
source§impl Default for MeasurementSelectionType
impl Default for MeasurementSelectionType
source§fn default() -> MeasurementSelectionType
fn default() -> MeasurementSelectionType
source§impl From<MeasurementSelectionType> for i32
impl From<MeasurementSelectionType> for i32
source§fn from(value: MeasurementSelectionType) -> i32
fn from(value: MeasurementSelectionType) -> i32
source§impl Hash for MeasurementSelectionType
impl Hash for MeasurementSelectionType
source§impl Ord for MeasurementSelectionType
impl Ord for MeasurementSelectionType
source§fn cmp(&self, other: &MeasurementSelectionType) -> Ordering
fn cmp(&self, other: &MeasurementSelectionType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for MeasurementSelectionType
impl PartialEq for MeasurementSelectionType
source§fn eq(&self, other: &MeasurementSelectionType) -> bool
fn eq(&self, other: &MeasurementSelectionType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MeasurementSelectionType
impl PartialOrd for MeasurementSelectionType
source§fn partial_cmp(&self, other: &MeasurementSelectionType) -> Option<Ordering>
fn partial_cmp(&self, other: &MeasurementSelectionType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for MeasurementSelectionType
impl TryFrom<i32> for MeasurementSelectionType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<MeasurementSelectionType, DecodeError>
fn try_from(value: i32) -> Result<MeasurementSelectionType, DecodeError>
impl Copy for MeasurementSelectionType
impl Eq for MeasurementSelectionType
impl StructuralPartialEq for MeasurementSelectionType
Auto Trait Implementations§
impl Freeze for MeasurementSelectionType
impl RefUnwindSafe for MeasurementSelectionType
impl Send for MeasurementSelectionType
impl Sync for MeasurementSelectionType
impl Unpin for MeasurementSelectionType
impl UnwindSafe for MeasurementSelectionType
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request