pub struct ObjectiveSpec {
pub metric_key: String,
pub direction: String,
pub target: Option<f64>,
pub min_delta: Option<f64>,
pub tolerance: Option<f64>,
pub report_file: Option<String>,
pub report_task_id: Option<String>,
pub weight: Option<f64>,
pub description: Option<String>,
pub extensions: Option<Struct>,
}Fields§
§metric_key: String§direction: String§target: Option<f64>§min_delta: Option<f64>§tolerance: Option<f64>§report_file: Option<String>§report_task_id: Option<String>§weight: Option<f64>§description: Option<String>§extensions: Option<Struct>Implementations§
Source§impl ObjectiveSpec
impl ObjectiveSpec
Sourcepub fn target(&self) -> f64
pub fn target(&self) -> f64
Returns the value of target, or the default value if target is unset.
Sourcepub fn min_delta(&self) -> f64
pub fn min_delta(&self) -> f64
Returns the value of min_delta, or the default value if min_delta is unset.
Sourcepub fn tolerance(&self) -> f64
pub fn tolerance(&self) -> f64
Returns the value of tolerance, or the default value if tolerance is unset.
Sourcepub fn report_file(&self) -> &str
pub fn report_file(&self) -> &str
Returns the value of report_file, or the default value if report_file is unset.
Sourcepub fn report_task_id(&self) -> &str
pub fn report_task_id(&self) -> &str
Returns the value of report_task_id, or the default value if report_task_id is unset.
Sourcepub fn weight(&self) -> f64
pub fn weight(&self) -> f64
Returns the value of weight, or the default value if weight 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.
Trait Implementations§
Source§impl Clone for ObjectiveSpec
impl Clone for ObjectiveSpec
Source§fn clone(&self) -> ObjectiveSpec
fn clone(&self) -> ObjectiveSpec
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 ObjectiveSpec
impl Debug for ObjectiveSpec
Source§impl Default for ObjectiveSpec
impl Default for ObjectiveSpec
Source§impl Message for ObjectiveSpec
impl Message for ObjectiveSpec
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 ObjectiveSpec
impl PartialEq for ObjectiveSpec
impl StructuralPartialEq for ObjectiveSpec
Auto Trait Implementations§
impl Freeze for ObjectiveSpec
impl RefUnwindSafe for ObjectiveSpec
impl Send for ObjectiveSpec
impl Sync for ObjectiveSpec
impl Unpin for ObjectiveSpec
impl UnsafeUnpin for ObjectiveSpec
impl UnwindSafe for ObjectiveSpec
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