Skip to main content

AuthApiKey

Trait AuthApiKey 

Source
pub trait AuthApiKey:
    Clone
    + Send
    + Sync
    + Serialize
    + Debug
    + 'static {
Show 21 methods // Required methods fn id(&self) -> &str; fn name(&self) -> Option<&str>; fn start(&self) -> Option<&str>; fn prefix(&self) -> Option<&str>; fn key_hash(&self) -> &str; fn user_id(&self) -> &str; fn refill_interval(&self) -> Option<i64>; fn refill_amount(&self) -> Option<i64>; fn last_refill_at(&self) -> Option<&str>; fn enabled(&self) -> bool; fn rate_limit_enabled(&self) -> bool; fn rate_limit_time_window(&self) -> Option<i64>; fn rate_limit_max(&self) -> Option<i64>; fn request_count(&self) -> Option<i64>; fn remaining(&self) -> Option<i64>; fn last_request(&self) -> Option<&str>; fn expires_at(&self) -> Option<&str>; fn created_at(&self) -> &str; fn updated_at(&self) -> &str; fn permissions(&self) -> Option<&str>; fn metadata(&self) -> Option<&str>;
}
Expand description

Trait representing an API key entity.

Required Methods§

Source

fn id(&self) -> &str

Source

fn name(&self) -> Option<&str>

Source

fn start(&self) -> Option<&str>

Source

fn prefix(&self) -> Option<&str>

Source

fn key_hash(&self) -> &str

Source

fn user_id(&self) -> &str

Source

fn refill_interval(&self) -> Option<i64>

Source

fn refill_amount(&self) -> Option<i64>

Source

fn last_refill_at(&self) -> Option<&str>

Source

fn enabled(&self) -> bool

Source

fn rate_limit_enabled(&self) -> bool

Source

fn rate_limit_time_window(&self) -> Option<i64>

Source

fn rate_limit_max(&self) -> Option<i64>

Source

fn request_count(&self) -> Option<i64>

Source

fn remaining(&self) -> Option<i64>

Source

fn last_request(&self) -> Option<&str>

Source

fn expires_at(&self) -> Option<&str>

Source

fn created_at(&self) -> &str

Source

fn updated_at(&self) -> &str

Source

fn permissions(&self) -> Option<&str>

Source

fn metadata(&self) -> Option<&str>

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§