ApiKey

Trait ApiKey 

Source
pub trait ApiKey:
    Send
    + Sync
    + Clone
    + 'static {
    type IdType: ApiKeyId;

    // 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,

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<D> ApiKey for PgKey<D>
where D: PgKeyDomain,