pub enum ForSpec {
Inline(String),
ClauseList(Vec<String>),
UnionOfClauseLists(Vec<Vec<String>>),
}Expand description
The three accepted shapes of the for field.
Routes through the clause parser:
ForSpec::Inline→ one call toparse_clause_list, then the structural-detection rule (comprehension_from_subspaces).ForSpec::ClauseList→ oneparse_clause_listper entry; each entry becomes its own sub-space (so name repetition across entries triggers Union per the rule).ForSpec::UnionOfClauseLists→ oneparse_clause_listper inner list; each inner list is one sub-space.
Variants§
Inline(String)
for: "k in 1..10, limit in [1, 2, 3]" — one inline
string, possibly multi-clause.
ClauseList(Vec<String>)
for: ["k in 1..10", "limit in [1, 2, 3]"] — each
entry is one clause’s text.
UnionOfClauseLists(Vec<Vec<String>>)
for: [["k in 10", "limit in 1..5"], …] — each inner
list is one sub-space (cartesian over those clauses).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ForSpec
impl<'de> Deserialize<'de> for ForSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ForSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ForSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ForSpec
impl Serialize for ForSpec
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Forget for ForSpec
impl Freeze for ForSpecwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Vec<String>>: Freeze,
impl Move for ForSpec
impl RefUnwindSafe for ForSpec
impl Send for ForSpecwhere
RawVecInner: Send,
impl Sync for ForSpecwhere
RawVecInner: Sync,
impl Unpin for ForSpec
impl UnsafeUnpin for ForSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Vec<String>>: UnsafeUnpin,
impl UnwindSafe for ForSpecwhere
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
Mutably borrows from an owned value. Read more
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> ⓘ
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