Struct entity_sled::SledDatabase[][src]

pub struct SledDatabase(_);

Represents a sled database that performs synchronous insertion, retrieval, and removal. Sled maintains disk-backed data, so the serde feature has no purpose with this database.

Sled itself is thread-safe, maintaining an internal Arc for each tree; therefore, this database can be cloned to increment those counters.

Implementations

impl SledDatabase[src]

pub fn new(db: Db) -> Self[src]

Creates a new instance of the database wrapping a sled::Db

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 Clone for SledDatabase[src]

impl Database for SledDatabase[src]

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> DynClone for T where
    T: Clone
[src]

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.