pub struct CJsonRef { /* private fields */ }Expand description
Borrowed reference to a cJSON item (does not own the pointer)
Implementations§
Source§impl CJsonRef
impl CJsonRef
Sourcepub fn get_string_value(&self) -> CJsonResult<String>
pub fn get_string_value(&self) -> CJsonResult<String>
Get string value
Sourcepub fn get_number_value(&self) -> CJsonResult<f64>
pub fn get_number_value(&self) -> CJsonResult<f64>
Get number value as f64
Sourcepub fn get_int_value(&self) -> CJsonResult<i32>
pub fn get_int_value(&self) -> CJsonResult<i32>
Get number value as i32
Sourcepub fn get_bool_value(&self) -> CJsonResult<bool>
pub fn get_bool_value(&self) -> CJsonResult<bool>
Get boolean value
Sourcepub fn get_array_size(&self) -> CJsonResult<usize>
pub fn get_array_size(&self) -> CJsonResult<usize>
Get array size
Sourcepub fn get_array_item(&self, index: usize) -> CJsonResult<CJsonRef>
pub fn get_array_item(&self, index: usize) -> CJsonResult<CJsonRef>
Get array item by index
Sourcepub fn get_object_item(&self, key: &str) -> CJsonResult<CJsonRef>
pub fn get_object_item(&self, key: &str) -> CJsonResult<CJsonRef>
Get object item by key
Auto Trait Implementations§
impl Freeze for CJsonRef
impl RefUnwindSafe for CJsonRef
impl !Send for CJsonRef
impl !Sync for CJsonRef
impl Unpin for CJsonRef
impl UnsafeUnpin for CJsonRef
impl UnwindSafe for CJsonRef
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