[][src]Struct yttrium_key_base::databases::Database

pub struct Database { /* fields omitted */ }

This struct is a simple wrapper around a HashMap

Implementations

impl Database[src]

pub fn new_empty() -> Self[src]

Creates an empty database

pub fn new_from_value(value: Value) -> Self[src]

Builds a database from serde_json::Value

pub fn get_key(&self, name: &str) -> Option<StringOrArray>[src]

Retrieves a key from the database

pub fn write_key(&mut self, name: String, value: StringOrArray)[src]

Inserts a key into the database, overwriting the old one if it already existed

pub fn remove_key(&mut self, name: &str)[src]

Deletes a key from the database

pub fn key_exists(&self, name: &str) -> bool[src]

Checks if a key exists in the database

Trait Implementations

impl Debug for Database[src]

impl PartialEq<Database> for Database[src]

impl StructuralPartialEq for Database[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]