Skip to main content

SelectionSYM

Trait SelectionSYM 

Source
pub trait SelectionSYM {
    // Required methods
    fn false_() -> Self;
    fn true_() -> Self;
    fn all(selection: Self) -> Self;
    fn first(selection: Self) -> Self;
    fn range<R: Into<Range>>(range: R, selection: Self) -> Self;
    fn label<L: Into<LabelKey>>(labels: Vec<L>, selection: Self) -> Self;
    fn any(selection: Self) -> Self;
    fn intersection(lhs: Self, selection: Self) -> Self;
    fn union(lhs: Self, selection: Self) -> Self;
}
Expand description

This trait defines an abstract syntax without committing to a specific representation. It follow the tagless-final style where Selection is a default AST representation.

Required Methods§

Source

fn false_() -> Self

The identity selection (matches no nodes).

Source

fn true_() -> Self

The universal selection (matches all nodes).

Source

fn all(selection: Self) -> Self

Selects all values along the current dimension, then applies the inner selection.

Source

fn first(selection: 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, selection: 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>, selection: Self) -> Self

Selects values along the current dimension that match the given labels, then applies the inner selection.

Source

fn any(selection: Self) -> Self

Selects a random index along the current dimension, then applies the inner selection.

Source

fn intersection(lhs: Self, selection: Self) -> Self

The intersection (logical AND) of two selection expressions.

Source

fn union(lhs: Self, selection: Self) -> Self

The union (logical OR) of two selection expressions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§