Function proto_vulcan::relation::succeed [−][src]
pub fn succeed<U, E, G>() -> InferredGoal<U, E, G> where
U: User,
E: Engine<U>,
G: AnyGoal<U, E>,
Expand description
A relation that succeeds.
Proto-vulcan provides a built-in syntax true
to avoid the use-clause.
extern crate proto_vulcan;
use proto_vulcan::prelude::*;
fn main() {
let query = proto_vulcan_query!(|q| {
conde {
[true, q == 1],
[false, q == 2],
}
});
let mut iter = query.run();
assert!(iter.next().unwrap().q == 1);
assert!(iter.next().is_none());
}