Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Canop/bet
/ functions
Functions
53 in github.com/Canop/bet
⨍
Functions
53
◇
Types & classes
7
↓ 33 callers
Function
check
(input: &str, expected: bool)
src/test_bool.rs:26
↓ 24 callers
Function
check
(input: &str, expected: bool)
src/test_bool_faillible.rs:28
↓ 7 callers
Method
push_operator
add an operator right of the expression The context will decide whether it's unary or binary
src/be_tree.rs:281
↓ 4 callers
Method
push_atom
add an atom in a left-to-right expression building
src/be_tree.rs:178
↓ 3 callers
Method
close_par
add a closing parenthesis to the expression
src/be_tree.rs:221
↓ 3 callers
Method
is_none
(self)
src/child.rs:14
↓ 3 callers
Method
is_some
(self)
src/child.rs:17
↓ 3 callers
Method
open_par
add an opening parenthesis to the expression
src/be_tree.rs:213
↓ 3 callers
Method
push
add one of the possible token: parenthesis, operator or atom
src/be_tree.rs:168
↓ 3 callers
Method
store_node
(&mut self, node: Node<Op>)
src/be_tree.rs:142
↓ 2 callers
Method
add_child
(&mut self, child: Child)
src/be_tree.rs:152
↓ 2 callers
Method
eval
(self, a: bool, b: Option<bool>)
src/test_bool.rs:12
↓ 2 callers
Method
eval_child
( &self, eval_atom: &EvalAtom, eval_op: &EvalOp, short_circuit: &ShortCircuit,
src/be_tree.rs:360
↓ 2 callers
Method
eval_child_faillible
( &self, eval_atom: &EvalAtom, eval_op: &EvalOp, short_circuit: &ShortCircuit,
src/be_tree.rs:379
↓ 2 callers
Method
eval_node
( &self, eval_atom: &EvalAtom, eval_op: &EvalOp, short_circuit: &ShortCircuit,
src/be_tree.rs:400
↓ 2 callers
Method
eval_node_faillible
( &self, eval_atom: &EvalAtom, eval_op: &EvalOp, short_circuit: &ShortCircuit,
src/be_tree.rs:428
↓ 2 callers
Method
print_child
(&self, child: Child, indent: usize)
src/be_tree.rs:526
↓ 2 callers
Method
print_node
(&self, node_id: NodeId, indent: usize)
src/be_tree.rs:537
↓ 1 callers
Method
add_child_node
(&mut self, child_idx: usize)
src/be_tree.rs:161
↓ 1 callers
Method
eval
(self, a: bool, b: Option<bool>)
src/test_bool_faillible.rs:14
↓ 1 callers
Method
eval_faillible
( &self, eval_atom: EvalAtom, eval_op: EvalOp, short_circuit: ShortCircuit,
src/be_tree.rs:498
↓ 1 callers
Method
is_full
a node is full when we can't add other childs
src/node.rs:26
↓ 1 callers
Method
push_binary_operator
(&mut self, operator: Op)
src/be_tree.rs:243
↓ 1 callers
Method
push_unary_operator
(&mut self, operator: Op)
src/be_tree.rs:231
↓ 1 callers
Method
short_circuit
tell whether we can skip evaluating the second operand
src/test_bool_faillible.rs:23
↓ 1 callers
Method
short_circuit
tell whether we can skip evaluating the second operand
src/test_bool.rs:21
↓ 1 callers
Method
store_atom
(&mut self, atom: Atom)
src/be_tree.rs:147
Method
accept_atom
tell whether it would make sense to push an atom at this point (for example it makes no sense just after a closing parenthesis)
src/be_tree.rs:314
Method
accept_binary_operator
tell whether it would make sense to push a binary operator at this point (for example it makes no sense just after another operator)
src/be_tree.rs:307
Method
accept_closing_par
tell whether it would make sense to close a parenthesis at this point (for example it makes no sense just after an operator or if there are more closi
src/be_tree.rs:331
Method
accept_opening_par
tell whether it would make sense to open a parenthesis at this point (for example it makes no sense just after a closing parenthesis)
src/be_tree.rs:322
Method
accept_unary_operator
tell whether it would make sense to push a unary operator at this point (for example it makes no sense just after an atom)
src/be_tree.rs:299
Method
atom
(&self, atom_id: AtomId)
src/be_tree.rs:86
Method
atoms
take the atoms of the tree
src/be_tree.rs:115
Method
current_atom
returns a reference to the last atom if it's the last pushed token. Return none in other cases (including when no atom has been pushed at all)
src/be_tree.rs:127
Method
default
()
src/be_tree.rs:43
Method
empty
()
src/node.rs:33
Method
eq
(&self, other: &Self)
src/be_tree.rs:61
Method
eval
( &self, eval_atom: EvalAtom, eval_op: EvalOp, short_circuit: ShortCircuit,
src/be_tree.rs:470
Method
get_openness
return the count of open parenthesis minus the one of closing parenthesis. Illegal closing parenthesis are ignored (hence why this count can be a usiz
src/be_tree.rs:138
Method
head
(&self)
src/be_tree.rs:90
Method
is_atomic
tell whether the tree is exactly one atom
src/be_tree.rs:110
Method
is_empty
tells whether the expression is devoid of any atom
src/be_tree.rs:105
Function
issue_2
()
src/test_bool.rs:76
Method
iter_atoms
iterate on all atoms
src/be_tree.rs:120
Method
mutate_or_create_atom
if the last change was an atom pushed or modified, return a mutable reference to this atom. If not, push a new atom and return a mutable reference to
src/be_tree.rs:202
Method
new
create an empty expression, ready to be completed
src/be_tree.rs:78
Method
node
(&self, node_id: NodeId)
src/be_tree.rs:82
Method
print_tree
(&self)
src/be_tree.rs:544
Method
simplify
(&mut self)
src/be_tree.rs:512
Function
test_bool
()
src/test_bool_faillible.rs:50
Function
test_bool
()
src/test_bool.rs:48
Method
try_map_atoms
(&self, f: F)
src/be_tree.rs:340