Re:Learning Parser Combinators with Rust
by steveklabnik on Friday April 19, 2019 @11:02AM
(#19700158)
There's no inherent connection; you could absolutely do this.
[ Parent
| on HN ]
To restrict in the manner that the person above described would require some kind of const parameter in the type, no? The type would need to be parameterized over the `&str` to ensure that slices could only be taken from that particular string.
Re:Learning Parser Combinators with Rust
by steveklabnik on Friday April 19, 2019 @01:17PM
(#19701225)
I believe that’s correct.