pub struct InputPosition {
pub index: usize,
pub row: usize,
pub column: usize,
}Expand description
A position within the JSON input text.
Used to report the location of errors or elements within the source. All values are zero-indexed.
§Example
use fracturedjson::InputPosition;
// Represents position at the start of line 3, column 5
let pos = InputPosition { index: 42, row: 2, column: 4 };Fields§
§index: usizeByte offset from the start of the input (zero-indexed).
row: usizeLine number (zero-indexed, so first line is 0).
column: usizeColumn number within the line (zero-indexed).
Trait Implementations§
Source§impl Clone for InputPosition
impl Clone for InputPosition
Source§fn clone(&self) -> InputPosition
fn clone(&self) -> InputPosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputPosition
impl Debug for InputPosition
Source§impl PartialEq for InputPosition
impl PartialEq for InputPosition
impl Copy for InputPosition
impl Eq for InputPosition
impl StructuralPartialEq for InputPosition
Auto Trait Implementations§
impl Freeze for InputPosition
impl RefUnwindSafe for InputPosition
impl Send for InputPosition
impl Sync for InputPosition
impl Unpin for InputPosition
impl UnwindSafe for InputPosition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more