#[non_exhaustive]pub enum DeclarationKind {
Find(DecisionVariable),
FindAuxiliary(DecisionVariable),
Given(Moo<Domain>),
Quantified(Quantified),
QuantifiedExpr(Expression),
ValueLetting(Expression, Option<Moo<Domain>>),
DomainLetting(Moo<Domain>),
TemporaryValueLetting(Expression),
}Expand description
A specific kind of declaration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Find(DecisionVariable)
FindAuxiliary(DecisionVariable)
A rewriter-introduced or findAux-declared decision variable that must not be branched on
during search.
Used for auxiliaries such as those created when rewriting exists into constraints.
Given(Moo<Domain>)
Quantified(Quantified)
QuantifiedExpr(Expression)
ValueLetting(Expression, Option<Moo<Domain>>)
Carries an optional domain so instantiated givens can retain their declared domain.
DomainLetting(Moo<Domain>)
TemporaryValueLetting(Expression)
A short-lived value binding used internally during rewrites (e.g. comprehension unrolling).
Unlike ValueLetting, this is not intended to represent a user-visible top-level letting.
Trait Implementations§
Source§impl Biplate<Declaration> for DeclarationKind
impl Biplate<Declaration> for DeclarationKind
Source§fn biplate(
&self,
) -> (Tree<Declaration>, Box<dyn Fn(Tree<Declaration>) -> DeclarationKind>)
fn biplate( &self, ) -> (Tree<Declaration>, Box<dyn Fn(Tree<Declaration>) -> DeclarationKind>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn children_bi_count(&self) -> usize
fn children_bi_count(&self) -> usize
children_bi. Read more§fn try_replace_child_at_bi(&mut self, index: usize, child: To) -> bool
fn try_replace_child_at_bi(&mut self, index: usize, child: To) -> bool
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Biplate<DeclarationKind> for DeclarationKind
impl Biplate<DeclarationKind> for DeclarationKind
Source§fn biplate(
&self,
) -> (Tree<DeclarationKind>, Box<dyn Fn(Tree<DeclarationKind>) -> DeclarationKind>)
fn biplate( &self, ) -> (Tree<DeclarationKind>, Box<dyn Fn(Tree<DeclarationKind>) -> DeclarationKind>)
Source§fn children_bi_count(&self) -> usize
fn children_bi_count(&self) -> usize
children_bi. Read moreSource§fn try_replace_child_at_bi(
&mut self,
index: usize,
child: DeclarationKind,
) -> bool
fn try_replace_child_at_bi( &mut self, index: usize, child: DeclarationKind, ) -> bool
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Biplate<DeclarationPtr> for DeclarationKind
impl Biplate<DeclarationPtr> for DeclarationKind
Source§fn biplate(
&self,
) -> (Tree<DeclarationPtr>, Box<dyn Fn(Tree<DeclarationPtr>) -> DeclarationKind>)
fn biplate( &self, ) -> (Tree<DeclarationPtr>, Box<dyn Fn(Tree<DeclarationPtr>) -> DeclarationKind>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn children_bi_count(&self) -> usize
fn children_bi_count(&self) -> usize
children_bi. Read more§fn try_replace_child_at_bi(&mut self, index: usize, child: To) -> bool
fn try_replace_child_at_bi(&mut self, index: usize, child: To) -> bool
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Biplate<Expression> for DeclarationKind
impl Biplate<Expression> for DeclarationKind
Source§fn biplate(
&self,
) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> DeclarationKind>)
fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> DeclarationKind>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn children_bi_count(&self) -> usize
fn children_bi_count(&self) -> usize
children_bi. Read more§fn try_replace_child_at_bi(&mut self, index: usize, child: To) -> bool
fn try_replace_child_at_bi(&mut self, index: usize, child: To) -> bool
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Clone for DeclarationKind
impl Clone for DeclarationKind
Source§fn clone(&self) -> DeclarationKind
fn clone(&self) -> DeclarationKind
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 DeclarationKind
impl Debug for DeclarationKind
Source§impl<'de> Deserialize<'de> for DeclarationKind
impl<'de> Deserialize<'de> for DeclarationKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeclarationKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeclarationKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for DeclarationKind
Source§impl PartialEq for DeclarationKind
impl PartialEq for DeclarationKind
Source§impl Serialize for DeclarationKind
impl Serialize for DeclarationKind
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,
impl StructuralPartialEq for DeclarationKind
Source§impl Uniplate for DeclarationKind
impl Uniplate for DeclarationKind
Source§fn uniplate(
&self,
) -> (Tree<DeclarationKind>, Box<dyn Fn(Tree<DeclarationKind>) -> DeclarationKind>)
fn uniplate( &self, ) -> (Tree<DeclarationKind>, Box<dyn Fn(Tree<DeclarationKind>) -> DeclarationKind>)
Uniplate. Read moreSource§fn try_replace_child_at(&mut self, index: usize, child: DeclarationKind) -> bool
fn try_replace_child_at(&mut self, index: usize, child: DeclarationKind) -> bool
§fn descend(&self, op: &impl Fn(Self) -> Self) -> Self
fn descend(&self, op: &impl Fn(Self) -> Self) -> Self
§fn universe(&self) -> VecDeque<Self>
fn universe(&self) -> VecDeque<Self>
§fn with_children(&self, children: VecDeque<Self>) -> Self
fn with_children(&self, children: VecDeque<Self>) -> Self
§fn transform(&self, f: &impl Fn(Self) -> Self) -> Self
fn transform(&self, f: &impl Fn(Self) -> Self) -> Self
§fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self
fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self
§fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T
fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T
Auto Trait Implementations§
impl !Freeze for DeclarationKind
impl !RefUnwindSafe for DeclarationKind
impl !UnwindSafe for DeclarationKind
impl Send for DeclarationKind
impl Sync for DeclarationKind
impl Unpin for DeclarationKind
impl UnsafeUnpin for DeclarationKind
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 152 bytes
Size for each variant:
Find: 64 bytesFindAuxiliary: 64 bytesGiven: 16 bytesQuantified: 24 bytesQuantifiedExpr: 152 bytesValueLetting: 152 bytesDomainLetting: 16 bytesTemporaryValueLetting: 152 bytes