Function compact

Source
pub fn compact(selection: &Selection) -> SelectionCompact
Expand description

Returns a SelectionCompact rendering of the given Selection expression.

This produces a string in the surface syntax used by the sel! macro and the parse function, such as:

use ndslice::selection::Selection;
use ndslice::selection::dsl::*;
use ndslice::selection::pretty::compact;

let sel = all(range(0..4, true_()));
assert_eq!(compact(&sel).to_string(), "*,0:4");