pub trait ErrorExt {
// Required method
fn offset_within(&self, text: &str) -> Option<usize>;
}
Expand description
Utility methods extending serde_json::Error
Required Methods§
Sourcefn offset_within(&self, text: &str) -> Option<usize>
fn offset_within(&self, text: &str) -> Option<usize>
Zero-based byte offset at which the error was detected.
Returns None
if this reaches or exceeds text.len()
.