pub enum CardinalityClass {
Bounded(u64),
BoundedAtMost(u64),
Unbounded,
Continuous {
intervals: Vec<Interval>,
measure: ProductMeasure,
},
ContinuousAtMost {
intervals: Vec<Interval>,
measure_at_most: ProductMeasure,
},
Hybrid(Hybrid),
}Expand description
Cardinality of a comprehension’s dispense stream.
Six variants per spec §6.1:
- Discrete classes enumerate distinct tuples; the count
may be known exactly (
Bounded), bounded above (BoundedAtMost), or unknown (Unbounded). - Continuous classes describe a measure-theoretic value
space; they cannot enumerate and must be sampled via an
enclosing
order(_, strategy, Some(n))per V8. - Hybrid is a cartesian whose children mix discrete and continuous axes.
Variants§
Bounded(u64)
Discrete, exactly n tuples.
BoundedAtMost(u64)
Discrete, between 0 and n tuples (post-filter).
Unbounded
Discrete, no known upper bound (generator, live stream).
Continuous
Continuous source — bounded or unbounded real intervals
with an integrable product measure. Sampled rather than
enumerated; V8 requires an enclosing
order(_, strategy, Some(n)) before reaching a
PolyStreamer.
Fields
§
measure: ProductMeasureThe measure sampled.
ContinuousAtMost
Filtered continuous source. Measure reduced by the predicate; still requires sampling.
Fields
§
measure_at_most: ProductMeasureThe measure before the predicate reduces it.
Hybrid(Hybrid)
Mixed discrete × continuous cartesian. The discrete part is enumerable; the continuous part needs sampling. V8 applies to the continuous component.
Trait Implementations§
Source§impl Clone for CardinalityClass
impl Clone for CardinalityClass
Source§fn clone(&self) -> CardinalityClass
fn clone(&self) -> CardinalityClass
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CardinalityClass
impl Debug for CardinalityClass
Source§impl<'de> Deserialize<'de> for CardinalityClass
impl<'de> Deserialize<'de> for CardinalityClass
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 PartialEq for CardinalityClass
impl PartialEq for CardinalityClass
Source§impl Serialize for CardinalityClass
impl Serialize for CardinalityClass
impl StructuralPartialEq for CardinalityClass
Auto Trait Implementations§
impl Freeze for CardinalityClass
impl RefUnwindSafe for CardinalityClass
impl Send for CardinalityClass
impl Sync for CardinalityClass
impl Unpin for CardinalityClass
impl UnsafeUnpin for CardinalityClass
impl UnwindSafe for CardinalityClass
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