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.
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.
Is there a binding between the "top" pointer &mut T, and the string which the pointer/length pair points to?
Can we change our pointer to point somewhere else entirely, say a newly allocated string "goodbye, world"?