#[non_exhaustive]pub struct Cluster {
pub id: ClusterId,
pub label: String,
pub axis: String,
pub value: Value,
pub total: u64,
pub score_min: Option<f64>,
pub score_max: Option<f64>,
pub clusters: Vec<Cluster>,
}Expand description
Nested cluster form (§7).
clusters is always emitted, even when empty — §7’s example shows
"clusters": [] on leaf clusters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: ClusterIdCluster id from the root to this cluster.
label: StringHuman-readable label (often the value itself or a band range).
axis: StringField path for this cluster’s axis (matches one of result.axes[].field).
value: ValueRaw value behind this cluster (shape depends on the strategy).
total: u64Number of input items inside this cluster (recursively).
score_min: Option<f64>Minimum score within this cluster, when a score path is in use.
score_max: Option<f64>Maximum score within this cluster, when a score path is in use.
clusters: Vec<Cluster>Direct children of this cluster. Always emitted, even when empty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cluster
impl<'de> Deserialize<'de> for Cluster
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
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnsafeUnpin for Cluster
impl UnwindSafe for Cluster
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