pub struct ScanResult {
pub structural_chars: Vec<usize>,
pub string_bounds: SmallVec<[Range; 16]>,
pub number_bounds: SmallVec<[Range; 16]>,
pub literal_bounds: SmallVec<[Range; 8]>,
pub root_type: Option<ValueType>,
}
Expand description
Result of scanning JSON input
Fields§
§structural_chars: Vec<usize>
Positions of structural characters
string_bounds: SmallVec<[Range; 16]>
String boundary positions
number_bounds: SmallVec<[Range; 16]>
Number boundary positions
literal_bounds: SmallVec<[Range; 8]>
Literal boundary positions (true/false/null)
root_type: Option<ValueType>
Detected root value type
Implementations§
Source§impl ScanResult
impl ScanResult
Sourcepub fn determine_root_type(&self) -> ValueType
pub fn determine_root_type(&self) -> ValueType
Determine the root JSON value type
Sourcepub fn is_numeric_array(&self) -> bool
pub fn is_numeric_array(&self) -> bool
Check if this appears to be a numeric array
Sourcepub fn is_table_like(&self) -> bool
pub fn is_table_like(&self) -> bool
Check if this appears to be a table/object array
Trait Implementations§
Source§impl Clone for ScanResult
impl Clone for ScanResult
Source§fn clone(&self) -> ScanResult
fn clone(&self) -> ScanResult
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 ScanResult
impl Debug for ScanResult
Auto Trait Implementations§
impl Freeze for ScanResult
impl RefUnwindSafe for ScanResult
impl Send for ScanResult
impl Sync for ScanResult
impl Unpin for ScanResult
impl UnwindSafe for ScanResult
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