struct JsonArray {
id: ArrayId,
list: RGAList<JsonValue>,
}Expand description
An array in the JSON document (using RGAList).
Fields§
§id: ArrayId§list: RGAList<JsonValue>Implementations§
Source§impl JsonArray
impl JsonArray
fn new(id: ArrayId, replica_id: &str) -> Self
fn get(&self, index: usize) -> Option<&JsonValue>
fn len(&self) -> usize
fn insert(&mut self, index: usize, value: JsonValue)
fn remove(&mut self, index: usize) -> Option<JsonValue>
fn push(&mut self, value: JsonValue)
fn iter(&self) -> impl Iterator<Item = &JsonValue> + '_
fn merge(&mut self, other: &JsonArray)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JsonArray
impl<'de> Deserialize<'de> for JsonArray
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for JsonArray
Auto Trait Implementations§
impl Freeze for JsonArray
impl RefUnwindSafe for JsonArray
impl Send for JsonArray
impl Sync for JsonArray
impl Unpin for JsonArray
impl UnwindSafe for JsonArray
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