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§

Object Safety§

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