pub trait Node<const B: usize>: Sized {
// Required methods
fn has_fulfilled(&self) -> bool;
fn expand<'a, I>(&'a self, iter: I) -> Result<usize, BeamError>
where I: Iterator<Item = &'a mut MaybeUninit<Self>>;
fn evaluate(&self) -> u64;
// Provided methods
fn inflate(&mut self) { ... }
fn estimate(&self) -> Option<usize> { ... }
}Required Methods§
Sourcefn has_fulfilled(&self) -> bool
fn has_fulfilled(&self) -> bool
Heuristic function returning node’s fulfillment status
Sourcefn expand<'a, I>(&'a self, iter: I) -> Result<usize, BeamError>where
I: Iterator<Item = &'a mut MaybeUninit<Self>>,
fn expand<'a, I>(&'a self, iter: I) -> Result<usize, BeamError>where
I: Iterator<Item = &'a mut MaybeUninit<Self>>,
Generate successor nodes and write them to buffer
Sourcefn evaluate(&self) -> u64
fn evaluate(&self) -> u64
Node’s score heuristics funciton for Beam::cycle
Provided Methods§
Sourcefn inflate(&mut self)
fn inflate(&mut self)
Mutate nodes in Beam::node_buf to meet criteria for Node::expand
fn estimate(&self) -> Option<usize>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".