Trait simd_json::prelude::ArrayMut

source ·
pub trait ArrayMut {
    type Element;

    // Required methods
    fn get_mut(&mut self, i: usize) -> Option<&mut Self::Element>;
    fn pop(&mut self) -> Option<Self::Element>;
    fn push(&mut self, e: Self::Element);
}
Expand description

Prelude to include needed traits Mutability functions for a value array

Required Associated Types§

source

type Element

Elements of the array

Required Methods§

source

fn get_mut(&mut self, i: usize) -> Option<&mut Self::Element>

Gets a ref to a value based on n index, returns None if the current Value isn’t an Array or doesn’t contain the index it was asked for.

source

fn pop(&mut self) -> Option<Self::Element>

Returns the last element of the array or None

source

fn push(&mut self, e: Self::Element)

Appends e to the end of the Array

Implementations on Foreign Types§

source§

impl<T> ArrayMut for Vec<T>

source§

type Element = T

source§

fn get_mut(&mut self, i: usize) -> Option<&mut T>

source§

fn pop(&mut self) -> Option<T>

source§

fn push(&mut self, e: T)

Implementors§