pub struct ComprehensionSpec {
pub for: ForSpec,
pub where: Option<String>,
pub order: Option<String>,
}Expand description
The friendly, serde-deserializable comprehension surface.
Field names match the YAML / JSON keys 1:1. The
for field carries the only required input
— the clause specification — in any of the three accepted
shapes (see ForSpec).
Fields§
§for: ForSpecThe clause specification. See ForSpec for the
accepted shapes. r#for because for is a reserved
keyword in Rust — serde renames it for YAML / JSON.
where: Option<String>Optional filter predicate (the where clause). String
form, evaluated against bound coordinates at iteration
time.
order: Option<String>Optional traversal-order spec. See
the crate-internal parse_order_spec for
the accepted syntax (lex, halton/50,
shells(origin=center, depth=3), etc.).
Implementations§
Source§impl ComprehensionSpec
impl ComprehensionSpec
Sourcepub fn into_algebra(self) -> Result<Comprehension, SpecConvertError>
pub fn into_algebra(self) -> Result<Comprehension, SpecConvertError>
Convert this spec into the algebra-layer
AlgebraAst. Routes the for shape through the
clause parser, builds the flat clause form (applying where
/ order modifiers), and lowers it with
clauses_to_algebra.
Sourcepub fn into_legacy(self) -> Result<Comprehension, SpecConvertError>
pub fn into_legacy(self) -> Result<Comprehension, SpecConvertError>
Build the intermediate flat clause form. Exposed for tests and for a consumer that reads that form.
Trait Implementations§
Source§impl Clone for ComprehensionSpec
impl Clone for ComprehensionSpec
Source§fn clone(&self) -> ComprehensionSpec
fn clone(&self) -> ComprehensionSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComprehensionSpec
impl Debug for ComprehensionSpec
Source§impl<'de> Deserialize<'de> for ComprehensionSpec
impl<'de> Deserialize<'de> for ComprehensionSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComprehensionSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComprehensionSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ComprehensionSpec
impl Serialize for ComprehensionSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Forget for ComprehensionSpec
impl Freeze for ComprehensionSpecwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Vec<String>>: Freeze,
impl Move for ComprehensionSpec
impl RefUnwindSafe for ComprehensionSpec
impl Send for ComprehensionSpecwhere
RawVecInner: Send,
impl Sync for ComprehensionSpecwhere
RawVecInner: Sync,
impl Unpin for ComprehensionSpec
impl UnsafeUnpin for ComprehensionSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Vec<String>>: UnsafeUnpin,
impl UnwindSafe for ComprehensionSpecwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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