#[non_exhaustive]pub struct Interval {
pub min: Option<Min>,
pub max: Option<Max>,
/* private fields */
}assistant-service or conversational-search-service or search-service or serving-config-service only.Expand description
A floating point interval.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.min: Option<Min>The lower bound of the interval. If neither of the min fields are set, then the lower bound is negative infinity.
This field must be not larger than max.
Otherwise, an INVALID_ARGUMENT error is returned.
max: Option<Max>The upper bound of the interval. If neither of the max fields are set, then the upper bound is positive infinity.
This field must be not smaller than min.
Otherwise, an INVALID_ARGUMENT error is returned.
Implementations§
Source§impl Interval
impl Interval
pub fn new() -> Self
Sourcepub fn minimum(&self) -> Option<&f64>
pub fn minimum(&self) -> Option<&f64>
The value of min
if it holds a Minimum, None if the field is not set or
holds a different branch.
Sourcepub fn set_minimum<T: Into<f64>>(self, v: T) -> Self
pub fn set_minimum<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn exclusive_minimum(&self) -> Option<&f64>
pub fn exclusive_minimum(&self) -> Option<&f64>
The value of min
if it holds a ExclusiveMinimum, None if the field is not set or
holds a different branch.
Sourcepub fn set_exclusive_minimum<T: Into<f64>>(self, v: T) -> Self
pub fn set_exclusive_minimum<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn maximum(&self) -> Option<&f64>
pub fn maximum(&self) -> Option<&f64>
The value of max
if it holds a Maximum, None if the field is not set or
holds a different branch.
Sourcepub fn set_maximum<T: Into<f64>>(self, v: T) -> Self
pub fn set_maximum<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn exclusive_maximum(&self) -> Option<&f64>
pub fn exclusive_maximum(&self) -> Option<&f64>
The value of max
if it holds a ExclusiveMaximum, None if the field is not set or
holds a different branch.