store
ModuleUndocumented.
Contents
Functions
array_mergeString keys of `$b` overwrite in place, integer keys are renumbered after `$a`'s.emptyUndocumented.for_each_mutUndocumented.get`$a[k1][k2]...` (`None` when a step is missing or not an array).get_array`$a[k1][k2]...` as an array (`None` when missing or not an array).issetUndocumented.kAn array key from text (`$a['key']`).key_ofThe key a value becomes as an array key (`$a[$value]`): integers stay, strings are normalized, `null` is `""`, booleans and floats integers.key_valueA key as the value `foreach ($a as $key => ...)` gives.push`$a[k1][k2]...[] = $value`: the key it got.sA string value.set`$a[k1][k2]... = $value`.unsetNothing is created on the way.vivifyUndocumented.use utopia_database::adapter::memory::store::array_merge;Rust
pub fn array_merge(arrays: &[&Array]) -> ArrayString keys of $b overwrite in place, integer
keys are renumbered after $a's.
use utopia_database::adapter::memory::store::empty;Rust
pub fn empty(v: Option<&Value>) -> boolUndocumented.
use utopia_database::adapter::memory::store::for_each_mut;Rust
pub fn for_each_mut(a: &mut Array, mut f: impl FnMut(ArrayKey, &mut Value))Undocumented.
use utopia_database::adapter::memory::store::get;Rust
pub fn get<'a>(a: &'a Array, path: &[ArrayKey]) -> Option<&'a Value>$a[k1][k2]... (None when a step is missing or not an array).
use utopia_database::adapter::memory::store::get_array;Rust
pub fn get_array<'a>(a: &'a Array, path: &[ArrayKey]) -> Option<&'a Array>$a[k1][k2]... as an array (None when missing or not an array).
use utopia_database::adapter::memory::store::isset;Rust
pub fn isset(a: &Array, path: &[ArrayKey]) -> boolUndocumented.
use utopia_database::adapter::memory::store::k;Rust
pub fn k(s: &str) -> ArrayKeyAn array key from text ($a['key']).
use utopia_database::adapter::memory::store::key_of;Rust
pub fn key_of(v: &Value) -> ArrayKeyThe key a value becomes as an array key ($a[$value]): integers stay,
strings are normalized, null is "", booleans and floats integers.
use utopia_database::adapter::memory::store::key_value;Rust
pub fn key_value(key: KeyRef<'_>) -> ValueA key as the value foreach ($a as $key => ...) gives.
use utopia_database::adapter::memory::store::push;Rust
pub fn push(a: &mut Array, path: &[ArrayKey], value: Value) -> i64$a[k1][k2]...[] = $value: the key it got.
use utopia_database::adapter::memory::store::s;Rust
pub fn s(text: &str) -> ValueA string value.
use utopia_database::adapter::memory::store::set;Rust
pub fn set(a: &mut Array, path: &[ArrayKey], value: Value)$a[k1][k2]... = $value.
use utopia_database::adapter::memory::store::unset;Rust
pub fn unset(a: &mut Array, path: &[ArrayKey])Nothing is created on the way.
use utopia_database::adapter::memory::store::vivify;Rust
pub fn vivify<'a>(a: &'a mut Array, path: &[ArrayKey]) -> &'a mut ArrayUndocumented.