Logger

Trait Logger 

Source
pub trait Logger {
    // Required methods
    fn log_attempt(&mut self, attempt: Attempt);
    fn log_feasible_breakpoint(
        &mut self,
        list: &[Horizontal],
        fb: FeasibleBreakpoint,
    );
    fn log_new_active_node(&mut self, an: NewActiveNode);

    // Provided method
    fn log_selected_node(&mut self, _node_index: usize) { ... }
}

Required Methods§

Source

fn log_attempt(&mut self, attempt: Attempt)

Source

fn log_feasible_breakpoint( &mut self, list: &[Horizontal], fb: FeasibleBreakpoint, )

Source

fn log_new_active_node(&mut self, an: NewActiveNode)

Provided Methods§

Source

fn log_selected_node(&mut self, _node_index: usize)

Called with the node index of the active node the algorithm chose (TeX.2021.874-877); the chosen breakpoints are the chain of previous_node_index links from this node. TeX’s log has no equivalent line, hence the default no-op. This is used e.g. in knuthplass.dev to extract more information from the algorithm.

Implementors§