simple_database

Trait Indexable

Source
pub trait Indexable {
    const PRIMARY_KEY: &'static str = "primary_key";
    const DEFAULT_SORT: &'static str = Self::PRIMARY_KEY;

    // Required method
    fn primary_key(&self) -> Vec<u8> ;

    // Provided method
    fn secondary_keys(&self) -> Index { ... }
}

Provided Associated Constants§

Source

const PRIMARY_KEY: &'static str = "primary_key"

Source

const DEFAULT_SORT: &'static str = Self::PRIMARY_KEY

Required Methods§

Source

fn primary_key(&self) -> Vec<u8>

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O: Indexable + Serialize + for<'a> Deserialize<'a>> Indexable for UuidKeyed<O>

Source§

const PRIMARY_KEY: &'static str = "uuid"

Source§

const DEFAULT_SORT: &'static str = O::DEFAULT_SORT