Skip to main content

nominal_api/conjure/objects/scout/compute/resolved/api/
resolved_percentile.rs

1/// The value at the specified percentile.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith,
8    Copy
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct ResolvedPercentile {
15    #[serde(rename = "percentile")]
16    #[derive_with(with = conjure_object::private::DoubleWrapper)]
17    percentile: f64,
18}
19impl ResolvedPercentile {
20    /// Constructs a new instance of the type.
21    #[inline]
22    pub fn new(percentile: f64) -> Self {
23        Self::builder().percentile(percentile).build()
24    }
25    #[inline]
26    pub fn percentile(&self) -> f64 {
27        self.percentile
28    }
29}