[][src]Trait mini_kanren::core::goal::RawGoal

pub trait RawGoal<T: Default> {
    pub fn apply(&self, s: T) -> Stream<T>;

    pub fn run(&self, n: usize) -> Stream<T> { ... }
pub fn run_inf(&self) -> Stream<T> { ... }
pub fn iter(&self) -> StreamIter<T>

Notable traits for StreamIter<T>

impl<T> Iterator for StreamIter<T> type Item = T;
{ ... } }

The Goal trait. See module-level documentation for more details.

Required methods

pub fn apply(&self, s: T) -> Stream<T>[src]

Apply the goal to a Substitution.

Loading content...

Provided methods

pub fn run(&self, n: usize) -> Stream<T>[src]

Run the goal by applying it to an Substitution. Returns at most n values.

pub fn run_inf(&self) -> Stream<T>[src]

Run the goal by applying it to an Substitution. Returns all values but may crash.

pub fn iter(&self) -> StreamIter<T>

Notable traits for StreamIter<T>

impl<T> Iterator for StreamIter<T> type Item = T;
[src]

Convert the goal into an iterator of values.

Loading content...

Implementations on Foreign Types

impl<T: Default, G: Goal<T>> RawGoal<T> for Arc<G>[src]

impl<T: Default> RawGoal<T> for Arc<dyn RawGoal<T>>[src]

impl<T: Default, G: RawGoal<T>> RawGoal<T> for Rc<G>[src]

impl<T: Default> RawGoal<T> for Rc<dyn RawGoal<T>>[src]

Loading content...

Implementors

impl<T: Default, G: Fn(T) -> Stream<T>> RawGoal<T> for G[src]

Loading content...