pub trait AuthApiKey:
Clone
+ Send
+ Sync
+ Serialize
+ Debug
+ 'static {
Show 22 methods
// Required methods
fn id(&self) -> Cow<'_, str>;
fn name(&self) -> Option<&str>;
fn start(&self) -> Option<&str>;
fn prefix(&self) -> Option<&str>;
fn key_hash(&self) -> &str;
fn reference_id(&self) -> Cow<'_, str>;
fn config_id(&self) -> Cow<'_, str>;
fn refill_interval(&self) -> Option<f64>;
fn refill_amount(&self) -> Option<f64>;
fn last_refill_at(&self) -> Option<&str>;
fn enabled(&self) -> bool;
fn rate_limit_enabled(&self) -> bool;
fn rate_limit_time_window(&self) -> Option<f64>;
fn rate_limit_max(&self) -> Option<f64>;
fn request_count(&self) -> Option<f64>;
fn remaining(&self) -> Option<f64>;
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) -> Cow<'_, str>
fn name(&self) -> Option<&str>
fn start(&self) -> Option<&str>
fn prefix(&self) -> Option<&str>
fn key_hash(&self) -> &str
Sourcefn reference_id(&self) -> Cow<'_, str>
fn reference_id(&self) -> Cow<'_, str>
Owner of the key — a user id, or an organization id when the key’s configuration references organizations.
Sourcefn config_id(&self) -> Cow<'_, str>
fn config_id(&self) -> Cow<'_, str>
Name of the API-key configuration this key belongs to ("default"
unless the application registers named configurations).
fn refill_interval(&self) -> Option<f64>
fn refill_amount(&self) -> Option<f64>
fn last_refill_at(&self) -> Option<&str>
fn enabled(&self) -> bool
fn rate_limit_enabled(&self) -> bool
fn rate_limit_time_window(&self) -> Option<f64>
fn rate_limit_max(&self) -> Option<f64>
fn request_count(&self) -> Option<f64>
fn remaining(&self) -> Option<f64>
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".