Trait aterm::ATermFactory
[−]
[src]
pub trait ATermFactory<B> { type ATerm: ATerm<Blob = B, Rec = Self::ATermRef>; type ATermRef: Borrow<Self::ATerm>; fn no_annos(&self, term: Term<Self::ATermRef, B>) -> Self::ATermRef; fn with_annos<A>(
&self,
term: Term<Self::ATermRef, B>,
annos: A
) -> Self::ATermRef
where
A: IntoIterator<Item = Self::ATermRef>; fn int(&self, value: i32) -> Self::ATermRef { ... } fn string(&self, value: String) -> Self::ATermRef { ... } fn tuple<I>(&self, children: I) -> Self::ATermRef
where
I: IntoIterator<Item = Self::ATermRef>, { ... } fn real(&self, value: f32) -> Self::ATermRef { ... } fn application<I>(&self, constructor: String, children: I) -> Self::ATermRef
where
I: IntoIterator<Item = Self::ATermRef>, { ... } fn list<I>(&self, value: I) -> Self::ATermRef
where
I: IntoIterator<Item = Self::ATermRef>, { ... } fn placeholder(
&self,
value: TermPlaceholder<Self::ATermRef>
) -> Self::ATermRef { ... } fn blob(&self, value: B) -> Self::ATermRef { ... } fn long(&self, value: i64) -> Self::ATermRef { ... } fn t_int(&self, value: i32) -> Term<Self::ATermRef, B> { ... } fn t_string(&self, value: String) -> Term<Self::ATermRef, B> { ... } fn t_tuple<I>(&self, children: I) -> Term<Self::ATermRef, B>
where
I: IntoIterator<Item = Self::ATermRef>, { ... } fn t_real(&self, value: f32) -> Term<Self::ATermRef, B> { ... } fn t_application<I>(
&self,
constructor: String,
children: I
) -> Term<Self::ATermRef, B>
where
I: IntoIterator<Item = Self::ATermRef>, { ... } fn t_list<I>(&self, value: I) -> Term<Self::ATermRef, B>
where
I: IntoIterator<Item = Self::ATermRef>, { ... } fn t_placeholder(
&self,
value: TermPlaceholder<Self::ATermRef>
) -> Term<Self::ATermRef, B> { ... } fn t_blob(&self, value: B) -> Term<Self::ATermRef, B> { ... } fn t_long(&self, value: i64) -> Term<Self::ATermRef, B> { ... } }
An all-in-one package for building ATerm
s. Maybe be pure, or have internal mutability to give
you maximally shared ATerm
s.
Associated Types
type ATerm: ATerm<Blob = B, Rec = Self::ATermRef>
The ATerm
the factory builds
type ATermRef: Borrow<Self::ATerm>
The reference to an ATerm
that's returned. You usually want these to be cheaply cloneable!
Required Methods
fn no_annos(&self, term: Term<Self::ATermRef, B>) -> Self::ATermRef
fn with_annos<A>(
&self,
term: Term<Self::ATermRef, B>,
annos: A
) -> Self::ATermRef where
A: IntoIterator<Item = Self::ATermRef>,
&self,
term: Term<Self::ATermRef, B>,
annos: A
) -> Self::ATermRef where
A: IntoIterator<Item = Self::ATermRef>,
Provided Methods
fn int(&self, value: i32) -> Self::ATermRef
fn string(&self, value: String) -> Self::ATermRef
The string variant in ATerms is represented as an application with zero children!
fn tuple<I>(&self, children: I) -> Self::ATermRef where
I: IntoIterator<Item = Self::ATermRef>,
I: IntoIterator<Item = Self::ATermRef>,
The tuple in ATerms is represented as an application with an empty constructor string!
fn real(&self, value: f32) -> Self::ATermRef
fn application<I>(&self, constructor: String, children: I) -> Self::ATermRef where
I: IntoIterator<Item = Self::ATermRef>,
I: IntoIterator<Item = Self::ATermRef>,
fn list<I>(&self, value: I) -> Self::ATermRef where
I: IntoIterator<Item = Self::ATermRef>,
I: IntoIterator<Item = Self::ATermRef>,
fn placeholder(&self, value: TermPlaceholder<Self::ATermRef>) -> Self::ATermRef
fn blob(&self, value: B) -> Self::ATermRef
fn long(&self, value: i64) -> Self::ATermRef
fn t_int(&self, value: i32) -> Term<Self::ATermRef, B>
fn t_string(&self, value: String) -> Term<Self::ATermRef, B>
The string variant in ATerms is represented as an application with zero children!
fn t_tuple<I>(&self, children: I) -> Term<Self::ATermRef, B> where
I: IntoIterator<Item = Self::ATermRef>,
I: IntoIterator<Item = Self::ATermRef>,
The tuple in ATerms is represented as an application with an empty constructor string!
fn t_real(&self, value: f32) -> Term<Self::ATermRef, B>
fn t_application<I>(
&self,
constructor: String,
children: I
) -> Term<Self::ATermRef, B> where
I: IntoIterator<Item = Self::ATermRef>,
&self,
constructor: String,
children: I
) -> Term<Self::ATermRef, B> where
I: IntoIterator<Item = Self::ATermRef>,
fn t_list<I>(&self, value: I) -> Term<Self::ATermRef, B> where
I: IntoIterator<Item = Self::ATermRef>,
I: IntoIterator<Item = Self::ATermRef>,
fn t_placeholder(
&self,
value: TermPlaceholder<Self::ATermRef>
) -> Term<Self::ATermRef, B>
&self,
value: TermPlaceholder<Self::ATermRef>
) -> Term<Self::ATermRef, B>
fn t_blob(&self, value: B) -> Term<Self::ATermRef, B>
fn t_long(&self, value: i64) -> Term<Self::ATermRef, B>
Implementors
impl<B: Clone + Hash + Eq> ATermFactory<B> for aterm::rc::shared::ATermFactory<B>
impl<B: Clone> ATermFactory<B> for aterm::rc::ATermFactory<B>