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§
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>
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.