Creates an owned [`PointerBuf`] like `self` but with `token` appended. See [`PointerBuf::push_back`] for more details. Note**: this method allocates. If you find yourself calling it more than once for a given pointer, consider using [`PointerBuf::push_back`] instead. ## Examples ``` let ptr = jsonptr::Pointer::from_static("/foo"); let foobar = ptr.with_trailing_token("bar"); assert_eq!(foobar,
(&self, token: impl Into<Token<'t>>)
| 507 | /// assert_eq!(foobar, "/foo/bar"); |
| 508 | /// ``` |
| 509 | pub fn with_trailing_token<'t>(&self, token: impl Into<Token<'t>>) -> PointerBuf { |
| 510 | let mut buf = self.to_buf(); |
| 511 | buf.push_back(token.into()); |
| 512 | buf |
| 513 | } |
| 514 | |
| 515 | /// Creates an owned [`PointerBuf`] like `self` but with `token` prepended. |
| 516 | /// |