MCPcopy Create free account
hub / github.com/chanced/jsonptr / complete_offset

Method complete_offset

src/pointer.rs:1316–1318  ·  view source on GitHub ↗

Offset of the first invalid encoding from within the pointer. ```text "/foo/invalid~tilde/invalid" ↑ 12 ``` ``` use jsonptr::PointerBuf; let err = PointerBuf::parse("/foo/invalid~tilde/invalid").unwrap_err(); assert_eq!(err.complete_offset(), 12) ```

(&self)

Source from the content-addressed store, hash-verified

1314 /// assert_eq!(err.complete_offset(), 12)
1315 /// ```
1316 pub fn complete_offset(&self) -> usize {
1317 self.source_offset() + self.pointer_offset()
1318 }
1319}
1320
1321#[cfg(feature = "std")]

Callers 1

labelsMethod · 0.80

Calls 2

source_offsetMethod · 0.80
pointer_offsetMethod · 0.80

Tested by

no test coverage detected