Struct google_api_proto::google::monitoring::dashboard::v1::Threshold
source · pub struct Threshold {
pub label: String,
pub value: f64,
pub color: i32,
pub direction: i32,
pub target_axis: i32,
}
Expand description
Defines a threshold for categorizing time series values.
Fields§
§label: String
A label for the threshold.
value: f64
The value of the threshold. The value should be defined in the native scale of the metric.
color: i32
The state color for this threshold. Color is not allowed in a XyChart.
direction: i32
The direction for the current threshold. Direction is not allowed in a XyChart.
target_axis: i32
The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.
Implementations§
source§impl Threshold
impl Threshold
sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
Returns the enum value of color
, or the default if the field is set to an invalid enum value.
sourcepub fn direction(&self) -> Direction
pub fn direction(&self) -> Direction
Returns the enum value of direction
, or the default if the field is set to an invalid enum value.
sourcepub fn set_direction(&mut self, value: Direction)
pub fn set_direction(&mut self, value: Direction)
Sets direction
to the provided enum value.
sourcepub fn target_axis(&self) -> TargetAxis
pub fn target_axis(&self) -> TargetAxis
Returns the enum value of target_axis
, or the default if the field is set to an invalid enum value.
sourcepub fn set_target_axis(&mut self, value: TargetAxis)
pub fn set_target_axis(&mut self, value: TargetAxis)
Sets target_axis
to the provided enum value.
Trait Implementations§
source§impl Message for Threshold
impl Message for Threshold
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
.source§impl PartialEq for Threshold
impl PartialEq for Threshold
impl StructuralPartialEq for Threshold
Auto Trait Implementations§
impl Freeze for Threshold
impl RefUnwindSafe for Threshold
impl Send for Threshold
impl Sync for Threshold
impl Unpin for Threshold
impl UnwindSafe for Threshold
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<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