pub enum NormalizedSelection {
False,
True,
All(Box<NormalizedSelection>),
First(Box<NormalizedSelection>),
Range(Range, Box<NormalizedSelection>),
Label(Vec<LabelKey>, Box<NormalizedSelection>),
Any(Box<NormalizedSelection>),
Union(BTreeSet<NormalizedSelection>),
Intersection(BTreeSet<NormalizedSelection>),
}
Expand description
A normalized form of Selection
, used during canonicalization.
This structure uses BTreeSet
for Union
and Intersection
to
enable flattening, deduplication, and deterministic ordering.
Variants§
False
True
All(Box<NormalizedSelection>)
First(Box<NormalizedSelection>)
Range(Range, Box<NormalizedSelection>)
Label(Vec<LabelKey>, Box<NormalizedSelection>)
Any(Box<NormalizedSelection>)
Union(BTreeSet<NormalizedSelection>)
Intersection(BTreeSet<NormalizedSelection>)
Implementations§
Source§impl NormalizedSelection
impl NormalizedSelection
pub fn rewrite_bottom_up(self, rule: &impl RewriteRule) -> Self
Trait Implementations§
Source§impl Clone for NormalizedSelection
impl Clone for NormalizedSelection
Source§fn clone(&self) -> NormalizedSelection
fn clone(&self) -> NormalizedSelection
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 NormalizedSelection
impl Debug for NormalizedSelection
Source§impl From<NormalizedSelection> for Selection
impl From<NormalizedSelection> for Selection
Source§fn from(norm: NormalizedSelection) -> Self
fn from(norm: NormalizedSelection) -> Self
Converts the normalized form back into a standard Selection
.
Logical semantics are preserved, but normalized shape (e.g., set-based unions and intersections) is reconstructed as left-associated binary trees.
Source§impl Hash for NormalizedSelection
impl Hash for NormalizedSelection
Source§impl Ord for NormalizedSelection
impl Ord for NormalizedSelection
Source§fn cmp(&self, other: &NormalizedSelection) -> Ordering
fn cmp(&self, other: &NormalizedSelection) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NormalizedSelection
impl PartialEq for NormalizedSelection
Source§impl PartialOrd for NormalizedSelection
impl PartialOrd for NormalizedSelection
Source§impl SelectionSYM for NormalizedSelection
impl SelectionSYM for NormalizedSelection
Source§fn all(inner: Self) -> Self
fn all(inner: Self) -> Self
Selects all values along the current dimension, then applies
the inner selection.
Source§fn first(inner: Self) -> Self
fn first(inner: Self) -> Self
Selects the first index along the current dimension for which
the inner selection is non-empty.
Source§fn range<R: Into<Range>>(range: R, inner: Self) -> Self
fn range<R: Into<Range>>(range: R, inner: Self) -> Self
Selects values within the given range along the current
dimension, then applies the inner selection.
Source§fn label<L: Into<LabelKey>>(labels: Vec<L>, inner: Self) -> Self
fn label<L: Into<LabelKey>>(labels: Vec<L>, inner: Self) -> Self
Selects values along the current dimension that match the
given labels, then applies the inner selection.
Source§fn any(inner: Self) -> Self
fn any(inner: Self) -> Self
Selects a random index along the current dimension, then applies
the inner selection.
Source§fn intersection(lhs: Self, rhs: Self) -> Self
fn intersection(lhs: Self, rhs: Self) -> Self
The intersection (logical AND) of two selection expressions.
impl Eq for NormalizedSelection
impl StructuralPartialEq for NormalizedSelection
Auto Trait Implementations§
impl Freeze for NormalizedSelection
impl RefUnwindSafe for NormalizedSelection
impl Send for NormalizedSelection
impl Sync for NormalizedSelection
impl Unpin for NormalizedSelection
impl UnwindSafe for NormalizedSelection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more