pub trait Recursive: Functor + Sizedwhere
AsLanguage<Self>: Language,{
// Required methods
fn unwrap(self) -> Signature<Self, Self>;
fn wrap(inner: Signature<Self, Self>) -> Self;
fn sclone<T: Clone>(sig: &Signature<Self, T>) -> Signature<Self, T>;
fn sig_each_ref<T>(refs: &Signature<Self, T>) -> Signature<Self, &T>;
// Provided methods
fn add_into_rec_expr(self, expr: &mut RecExpr<Signature<Self, Id>>) -> Id { ... }
fn into_rec_expr(self) -> (RecExpr<Signature<Self, Id>>, Id) { ... }
fn from_rec_expr(expr: &RecExpr<Signature<Self, Id>>, id: Id) -> Self { ... }
}Expand description
A recursive language, which can be converted to and from a RecExpr.
In this case, <Self as Functor>::Container<T> plays a role of a language signature of language L, that is, primitive terms with parameters T
(hence the synonym Signature<L, T>).
Corresponding Language in egg must be AsLanguage<Self> (e.g. Signature<L, Id>).
Required Methods§
Sourcefn sig_each_ref<T>(refs: &Signature<Self, T>) -> Signature<Self, &T>
fn sig_each_ref<T>(refs: &Signature<Self, T>) -> Signature<Self, &T>
Converts a reference to a signature into a signature of references.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.