[][src]Struct spartan_lib::core::db::TreeDatabase

pub struct TreeDatabase<M> where
    M: Identifiable + Sortable,
    <M as Identifiable>::Id: Hash
{ /* fields omitted */ }

Tree-based database

Used by default server implementation.

Internally, contains message storage, and index for fast lookups, thus improving performance in comparison with VecDatabase

TreeDatabase heavily relies on correct M implementation of Sortable as only first element of index is used to check if there are any available messages in queue.

Trait Implementations

impl<M> Database<M> for TreeDatabase<M> where
    M: Identifiable + Sortable,
    <M as Identifiable>::Id: Hash
[src]

type PositionKey = <M as Identifiable>::Id

impl<M> Default for TreeDatabase<M> where
    M: Identifiable + Sortable,
    <M as Identifiable>::Id: Hash
[src]

impl<'de, M> Deserialize<'de> for TreeDatabase<M> where
    M: Identifiable + Sortable,
    <M as Identifiable>::Id: Hash,
    <M as Identifiable>::Id: Serialize + DeserializeOwned,
    <M as Sortable>::Sort: Serialize + DeserializeOwned,
    M: Serialize + DeserializeOwned
[src]

impl<M> Serialize for TreeDatabase<M> where
    M: Identifiable + Sortable,
    <M as Identifiable>::Id: Hash,
    <M as Identifiable>::Id: Serialize + DeserializeOwned,
    <M as Sortable>::Sort: Serialize + DeserializeOwned,
    M: Serialize + DeserializeOwned
[src]

impl<M> StatusAwareDatabase<M> for TreeDatabase<M> where
    M: Identifiable + Sortable + Status,
    <M as Identifiable>::Id: Hash
[src]

type RequeueKey = <M as Identifiable>::Id

Auto Trait Implementations

impl<M> RefUnwindSafe for TreeDatabase<M> where
    M: RefUnwindSafe,
    <M as Identifiable>::Id: RefUnwindSafe,
    <M as Sortable>::Sort: RefUnwindSafe
[src]

impl<M> Send for TreeDatabase<M> where
    M: Send,
    <M as Identifiable>::Id: Send,
    <M as Sortable>::Sort: Send
[src]

impl<M> Sync for TreeDatabase<M> where
    M: Sync,
    <M as Identifiable>::Id: Sync,
    <M as Sortable>::Sort: Sync
[src]

impl<M> Unpin for TreeDatabase<M> where
    M: Unpin,
    <M as Identifiable>::Id: Unpin
[src]

impl<M> UnwindSafe for TreeDatabase<M> where
    M: UnwindSafe,
    <M as Identifiable>::Id: RefUnwindSafe + UnwindSafe,
    <M as Sortable>::Sort: RefUnwindSafe
[src]

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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>,