web5_rust::common::traits

Trait Indexable

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

    // Provided methods
    fn primary_key(&self) -> Vec<u8>  { ... }
    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

Provided Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Indexable for Vec<u8>

Implementors§

source§

impl Indexable for Did

source§

const PRIMARY_KEY: &'static str = "did"

source§

impl Indexable for Protocol

source§

impl Indexable for DwnItem

source§

const PRIMARY_KEY: &'static str = "discover"

source§

impl Indexable for Record

source§

impl<O> Indexable for SignedObject<O>
where O: Indexable + Serialize + for<'a> Deserialize<'a> + SignableObject,

source§

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

source§

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

source§

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

source§

const PRIMARY_KEY: &'static str = "uuid"

source§

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