Trait torn_key_pool::ApiKey

source ·
pub trait ApiKey: Sync + Send + Debug + Clone + 'static {
    type IdType: PartialEq + Eq + Hash + Send + Sync + Debug + Clone;

    // Required methods
    fn value(&self) -> &str;
    fn id(&self) -> Self::IdType;

    // Provided method
    fn selector<D>(&self) -> KeySelector<Self, D>
       where D: KeyDomain { ... }
}

Required Associated Types§

Required Methods§

source

fn value(&self) -> &str

source

fn id(&self) -> Self::IdType

Provided Methods§

source

fn selector<D>(&self) -> KeySelector<Self, D>
where D: KeyDomain,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<D> ApiKey for PgKey<D>
where D: PgKeyDomain,

§

type IdType = i32