pub fn stream_memory_bound(rule: &Rule) -> Result<usize, String>
Calculate the conservative retained-memory bound for one rule stream.
Returns an error when the rule is incomplete or the calculation overflows usize.
usize