pub struct J {
pub line: usize,
pub v: V,
}Expand description
A JSON value and the 1-based line it starts on.
Fields§
§line: usize§v: VImplementations§
Source§impl J
impl J
pub fn get(&self, key: &str) -> Option<&J>
pub fn members(&self) -> &[(String, J)]
pub fn items(&self) -> &[J]
pub fn str(&self) -> Option<&str>
pub fn num(&self) -> Option<f64>
pub fn bool(&self) -> Option<bool>
pub fn is_obj(&self) -> bool
pub fn is_arr(&self) -> bool
Source§impl J
Builds values for to_pretty: J::obj([("a", J::number(1.0))]).
impl J
Builds values for to_pretty: J::obj([("a", J::number(1.0))]).
Trait Implementations§
impl StructuralPartialEq for J
Auto Trait Implementations§
impl Freeze for J
impl RefUnwindSafe for J
impl Send for J
impl Sync for J
impl Unpin for J
impl UnsafeUnpin for J
impl UnwindSafe for J
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