Struct entity_inmemory::InmemoryDatabase[][src]

pub struct InmemoryDatabase { /* fields omitted */ }

Represents an in-memory database that performs synchronous insertion, retrieval, and removal. If the feature serde is enabled, this database can be serialized and deserialized.

Implementations

impl InmemoryDatabase[src]

pub fn new() -> Self[src]

Creates a new instance of an in-memory database

impl InmemoryDatabase[src]

pub fn ids(&self) -> HashSet<Id>[src]

Returns ids of all ents stored in the database

pub fn has_id(&self, id: Id) -> bool[src]

Returns true if database contains the provided id

pub fn ids_for_type(&self, type: &str) -> HashSet<Id>[src]

Returns ids of all ents for the given type

Trait Implementations

impl Database for InmemoryDatabase[src]

impl Default for InmemoryDatabase[src]

fn default() -> Self[src]

Creates a new, empty database entry

Auto Trait Implementations

Blanket Implementations

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

impl<T> AsAny for T where
    T: 'static, 
[src]

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

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

impl<T> DatabaseExt for T where
    T: Database
[src]

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

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

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.