jsonptr icon indicating copy to clipboard operation
jsonptr copied to clipboard

Add fluid methods to `PointerBuf`

Open chanced opened this issue 1 year ago • 0 comments

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());

chanced avatar May 08 '24 17:05 chanced