matchcore 0.4.0

A high-performance order book and price-time matching engine implemented as a single-threaded, deterministic, in-memory state machine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::fmt;

/// Write a string with indented lines
pub(crate) fn write_indented(
    f: &mut fmt::Formatter<'_>,
    s: &str,
    num_indent: usize,
) -> fmt::Result {
    for line in s.lines() {
        writeln!(f, "{:>num_indent$}{line}", "", num_indent = num_indent)?;
    }
    Ok(())
}