jsonptr
jsonptr copied to clipboard
Add fluid methods to `PointerBuf`
Add fluid methods to Pointer that mutate in place and return a new instance.
- with token appended
- with token prepended
- with first token removed (maybe? - dont know whether to send the token into the void)
- with last token removed (same ^^)
this is somewhat obnoxious to deal with:
let mut instance_location = self.instance_location.clone();
instance_location.push_back(instance.into());
let mut keyword_location = self.keyword_location.clone();
keyword_location.push_back(keyword.into());