#[repr(C)]pub struct yyjson_mut_arr_iter {
pub idx: usize,
pub max: usize,
pub cur: *mut yyjson_mut_val,
pub pre: *mut yyjson_mut_val,
pub arr: *mut yyjson_mut_val,
}Expand description
A mutable JSON array iterator.
@warning You should not modify the array while iterating over it, but you can
use yyjson_mut_arr_iter_remove() to remove current value.
@par Example @code yyjson_mut_val *val; yyjson_mut_arr_iter iter = yyjson_mut_arr_iter_with(arr); while ((val = yyjson_mut_arr_iter_next(&iter))) { your_func(val); if (your_val_is_unused(val)) { yyjson_mut_arr_iter_remove(&iter); } } @endcode
Fields§
§idx: usize< next value’s index
max: usize< maximum index (arr.size)
cur: *mut yyjson_mut_val< current value
pre: *mut yyjson_mut_val< previous value
arr: *mut yyjson_mut_val< the array being iterated
Trait Implementations§
Source§impl Clone for yyjson_mut_arr_iter
impl Clone for yyjson_mut_arr_iter
Source§fn clone(&self) -> yyjson_mut_arr_iter
fn clone(&self) -> yyjson_mut_arr_iter
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 yyjson_mut_arr_iter
impl Debug for yyjson_mut_arr_iter
impl Copy for yyjson_mut_arr_iter
Auto Trait Implementations§
impl Freeze for yyjson_mut_arr_iter
impl RefUnwindSafe for yyjson_mut_arr_iter
impl !Send for yyjson_mut_arr_iter
impl !Sync for yyjson_mut_arr_iter
impl Unpin for yyjson_mut_arr_iter
impl UnwindSafe for yyjson_mut_arr_iter
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