#[non_exhaustive]pub enum SearchDimension {
Float {
name: String,
low: f64,
high: f64,
scale: Scale,
default: Option<f64>,
},
Int {
name: String,
low: i64,
high: i64,
scale: Scale,
},
Categorical {
name: String,
choices: Vec<Value>,
},
Conditional {
name: String,
parent: String,
parent_values: Vec<Value>,
dimension: Box<SearchDimension>,
},
}Expand description
A single searchable parameter dimension.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Float
Continuous range (f64)
Int
Integer range
Categorical
Discrete set of choices
Conditional
Active only when parent parameter has specific values
Implementations§
Trait Implementations§
Source§impl Clone for SearchDimension
impl Clone for SearchDimension
Source§fn clone(&self) -> SearchDimension
fn clone(&self) -> SearchDimension
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 SearchDimension
impl Debug for SearchDimension
Source§impl<'de> Deserialize<'de> for SearchDimension
impl<'de> Deserialize<'de> for SearchDimension
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SearchDimension
impl Display for SearchDimension
Source§impl PartialEq for SearchDimension
impl PartialEq for SearchDimension
Source§impl Serialize for SearchDimension
impl Serialize for SearchDimension
impl StructuralPartialEq for SearchDimension
Auto Trait Implementations§
impl Freeze for SearchDimension
impl RefUnwindSafe for SearchDimension
impl Send for SearchDimension
impl Sync for SearchDimension
impl Unpin for SearchDimension
impl UnsafeUnpin for SearchDimension
impl UnwindSafe for SearchDimension
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