pub struct LanguageExpression<'a> { /* private fields */ }Expand description
An expression pool with a defined root.
Implementations§
Source§impl<'a> LanguageExpression<'a>
impl<'a> LanguageExpression<'a>
Sourcepub fn run(
&self,
scenario: &Scenario<'a>,
config: Option<ExecutionConfig>,
) -> Result<LanguageResult<'a>, LanguageTypeError>
pub fn run( &self, scenario: &Scenario<'a>, config: Option<ExecutionConfig>, ) -> Result<LanguageResult<'a>, LanguageTypeError>
Run a LanguageExpression in the language of thought and return the LanguageResult
Sourcepub fn parse(s: &'a str) -> Result<LanguageExpression<'a>, LambdaParseError>
pub fn parse(s: &'a str) -> Result<LanguageExpression<'a>, LambdaParseError>
Parse a given language of thought expression and return the LanguageExpression. This
does not support tools from the lambda calculus, see RootedLambdaPool.
Trait Implementations§
Source§impl<'a> Clone for LanguageExpression<'a>
impl<'a> Clone for LanguageExpression<'a>
Source§fn clone(&self) -> LanguageExpression<'a>
fn clone(&self) -> LanguageExpression<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for LanguageExpression<'a>
impl<'a> Debug for LanguageExpression<'a>
Source§impl Display for LanguageExpression<'_>
impl Display for LanguageExpression<'_>
Source§impl<'a> From<LanguageExpression<'a>> for RootedLambdaPool<'a, Expr<'a>>
impl<'a> From<LanguageExpression<'a>> for RootedLambdaPool<'a, Expr<'a>>
Source§fn from(value: LanguageExpression<'a>) -> Self
fn from(value: LanguageExpression<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for LanguageExpression<'a>
impl<'a> Hash for LanguageExpression<'a>
Source§impl<'a> PartialEq for LanguageExpression<'a>
impl<'a> PartialEq for LanguageExpression<'a>
impl<'a> Eq for LanguageExpression<'a>
impl<'a> StructuralPartialEq for LanguageExpression<'a>
Auto Trait Implementations§
impl<'a> Freeze for LanguageExpression<'a>
impl<'a> RefUnwindSafe for LanguageExpression<'a>
impl<'a> Send for LanguageExpression<'a>
impl<'a> Sync for LanguageExpression<'a>
impl<'a> Unpin for LanguageExpression<'a>
impl<'a> UnwindSafe for LanguageExpression<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.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§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].