pub struct ApiKeyPluginBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ApiKeyPluginBuilder<S>
impl<S: State> ApiKeyPluginBuilder<S>
Sourcepub fn build(self) -> ApiKeyPluginwhere
S: IsComplete,
pub fn build(self) -> ApiKeyPluginwhere
S: IsComplete,
Finishes building and performs the requested action.
Sourcepub fn config_id(self, value: String) -> ApiKeyPluginBuilder<SetConfigId<S>>where
S::ConfigId: IsUnset,
pub fn config_id(self, value: String) -> ApiKeyPluginBuilder<SetConfigId<S>>where
S::ConfigId: IsUnset,
Sourcepub fn maybe_config_id(
self,
value: Option<String>,
) -> ApiKeyPluginBuilder<SetConfigId<S>>where
S::ConfigId: IsUnset,
pub fn maybe_config_id(
self,
value: Option<String>,
) -> ApiKeyPluginBuilder<SetConfigId<S>>where
S::ConfigId: IsUnset,
Sourcepub fn references(
self,
value: ApiKeyReferences,
) -> ApiKeyPluginBuilder<SetReferences<S>>where
S::References: IsUnset,
pub fn references(
self,
value: ApiKeyReferences,
) -> ApiKeyPluginBuilder<SetReferences<S>>where
S::References: IsUnset,
Sourcepub fn maybe_references(
self,
value: Option<ApiKeyReferences>,
) -> ApiKeyPluginBuilder<SetReferences<S>>where
S::References: IsUnset,
pub fn maybe_references(
self,
value: Option<ApiKeyReferences>,
) -> ApiKeyPluginBuilder<SetReferences<S>>where
S::References: IsUnset,
Sourcepub fn key_length(self, value: usize) -> ApiKeyPluginBuilder<SetKeyLength<S>>where
S::KeyLength: IsUnset,
pub fn key_length(self, value: usize) -> ApiKeyPluginBuilder<SetKeyLength<S>>where
S::KeyLength: IsUnset,
Sourcepub fn maybe_key_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetKeyLength<S>>where
S::KeyLength: IsUnset,
pub fn maybe_key_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetKeyLength<S>>where
S::KeyLength: IsUnset,
Sourcepub fn prefix(self, value: String) -> ApiKeyPluginBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
pub fn prefix(self, value: String) -> ApiKeyPluginBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
Sourcepub fn maybe_prefix(
self,
value: Option<String>,
) -> ApiKeyPluginBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
pub fn maybe_prefix(
self,
value: Option<String>,
) -> ApiKeyPluginBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
Sourcepub fn default_permissions(
self,
value: HashMap<String, Vec<String>>,
) -> ApiKeyPluginBuilder<SetDefaultPermissions<S>>where
S::DefaultPermissions: IsUnset,
pub fn default_permissions(
self,
value: HashMap<String, Vec<String>>,
) -> ApiKeyPluginBuilder<SetDefaultPermissions<S>>where
S::DefaultPermissions: IsUnset,
Sourcepub fn maybe_default_permissions(
self,
value: Option<HashMap<String, Vec<String>>>,
) -> ApiKeyPluginBuilder<SetDefaultPermissions<S>>where
S::DefaultPermissions: IsUnset,
pub fn maybe_default_permissions(
self,
value: Option<HashMap<String, Vec<String>>>,
) -> ApiKeyPluginBuilder<SetDefaultPermissions<S>>where
S::DefaultPermissions: IsUnset,
Sourcepub fn custom_key_generator(
self,
value: Arc<dyn ApiKeyGenerator>,
) -> ApiKeyPluginBuilder<SetCustomKeyGenerator<S>>where
S::CustomKeyGenerator: IsUnset,
pub fn custom_key_generator(
self,
value: Arc<dyn ApiKeyGenerator>,
) -> ApiKeyPluginBuilder<SetCustomKeyGenerator<S>>where
S::CustomKeyGenerator: IsUnset,
Sourcepub fn maybe_custom_key_generator(
self,
value: Option<Arc<dyn ApiKeyGenerator>>,
) -> ApiKeyPluginBuilder<SetCustomKeyGenerator<S>>where
S::CustomKeyGenerator: IsUnset,
pub fn maybe_custom_key_generator(
self,
value: Option<Arc<dyn ApiKeyGenerator>>,
) -> ApiKeyPluginBuilder<SetCustomKeyGenerator<S>>where
S::CustomKeyGenerator: IsUnset,
Sourcepub fn default_permissions_callback(
self,
value: Arc<dyn ApiKeyDefaultPermissions>,
) -> ApiKeyPluginBuilder<SetDefaultPermissionsCallback<S>>where
S::DefaultPermissionsCallback: IsUnset,
pub fn default_permissions_callback(
self,
value: Arc<dyn ApiKeyDefaultPermissions>,
) -> ApiKeyPluginBuilder<SetDefaultPermissionsCallback<S>>where
S::DefaultPermissionsCallback: IsUnset,
Sourcepub fn maybe_default_permissions_callback(
self,
value: Option<Arc<dyn ApiKeyDefaultPermissions>>,
) -> ApiKeyPluginBuilder<SetDefaultPermissionsCallback<S>>where
S::DefaultPermissionsCallback: IsUnset,
pub fn maybe_default_permissions_callback(
self,
value: Option<Arc<dyn ApiKeyDefaultPermissions>>,
) -> ApiKeyPluginBuilder<SetDefaultPermissionsCallback<S>>where
S::DefaultPermissionsCallback: IsUnset,
Sourcepub fn api_key_headers(
self,
value: Vec<String>,
) -> ApiKeyPluginBuilder<SetApiKeyHeaders<S>>where
S::ApiKeyHeaders: IsUnset,
pub fn api_key_headers(
self,
value: Vec<String>,
) -> ApiKeyPluginBuilder<SetApiKeyHeaders<S>>where
S::ApiKeyHeaders: IsUnset,
Sourcepub fn maybe_api_key_headers(
self,
value: Option<Vec<String>>,
) -> ApiKeyPluginBuilder<SetApiKeyHeaders<S>>where
S::ApiKeyHeaders: IsUnset,
pub fn maybe_api_key_headers(
self,
value: Option<Vec<String>>,
) -> ApiKeyPluginBuilder<SetApiKeyHeaders<S>>where
S::ApiKeyHeaders: IsUnset,
Sourcepub fn custom_api_key_getter(
self,
value: Arc<dyn ApiKeyGetter>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyGetter<S>>where
S::CustomApiKeyGetter: IsUnset,
pub fn custom_api_key_getter(
self,
value: Arc<dyn ApiKeyGetter>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyGetter<S>>where
S::CustomApiKeyGetter: IsUnset,
Sourcepub fn maybe_custom_api_key_getter(
self,
value: Option<Arc<dyn ApiKeyGetter>>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyGetter<S>>where
S::CustomApiKeyGetter: IsUnset,
pub fn maybe_custom_api_key_getter(
self,
value: Option<Arc<dyn ApiKeyGetter>>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyGetter<S>>where
S::CustomApiKeyGetter: IsUnset,
Sourcepub fn custom_api_key_validator(
self,
value: Arc<dyn ApiKeyValidator>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyValidator<S>>where
S::CustomApiKeyValidator: IsUnset,
pub fn custom_api_key_validator(
self,
value: Arc<dyn ApiKeyValidator>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyValidator<S>>where
S::CustomApiKeyValidator: IsUnset,
Sourcepub fn maybe_custom_api_key_validator(
self,
value: Option<Arc<dyn ApiKeyValidator>>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyValidator<S>>where
S::CustomApiKeyValidator: IsUnset,
pub fn maybe_custom_api_key_validator(
self,
value: Option<Arc<dyn ApiKeyValidator>>,
) -> ApiKeyPluginBuilder<SetCustomApiKeyValidator<S>>where
S::CustomApiKeyValidator: IsUnset,
Sourcepub fn disable_key_hashing(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetDisableKeyHashing<S>>where
S::DisableKeyHashing: IsUnset,
pub fn disable_key_hashing(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetDisableKeyHashing<S>>where
S::DisableKeyHashing: IsUnset,
Sourcepub fn maybe_disable_key_hashing(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetDisableKeyHashing<S>>where
S::DisableKeyHashing: IsUnset,
pub fn maybe_disable_key_hashing(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetDisableKeyHashing<S>>where
S::DisableKeyHashing: IsUnset,
Sourcepub fn starting_characters_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetStartingCharactersLength<S>>where
S::StartingCharactersLength: IsUnset,
pub fn starting_characters_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetStartingCharactersLength<S>>where
S::StartingCharactersLength: IsUnset,
Sourcepub fn maybe_starting_characters_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetStartingCharactersLength<S>>where
S::StartingCharactersLength: IsUnset,
pub fn maybe_starting_characters_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetStartingCharactersLength<S>>where
S::StartingCharactersLength: IsUnset,
Sourcepub fn store_starting_characters(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetStoreStartingCharacters<S>>where
S::StoreStartingCharacters: IsUnset,
pub fn store_starting_characters(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetStoreStartingCharacters<S>>where
S::StoreStartingCharacters: IsUnset,
Sourcepub fn maybe_store_starting_characters(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetStoreStartingCharacters<S>>where
S::StoreStartingCharacters: IsUnset,
pub fn maybe_store_starting_characters(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetStoreStartingCharacters<S>>where
S::StoreStartingCharacters: IsUnset,
Sourcepub fn max_prefix_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMaxPrefixLength<S>>where
S::MaxPrefixLength: IsUnset,
pub fn max_prefix_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMaxPrefixLength<S>>where
S::MaxPrefixLength: IsUnset,
Sourcepub fn maybe_max_prefix_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMaxPrefixLength<S>>where
S::MaxPrefixLength: IsUnset,
pub fn maybe_max_prefix_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMaxPrefixLength<S>>where
S::MaxPrefixLength: IsUnset,
Sourcepub fn min_prefix_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMinPrefixLength<S>>where
S::MinPrefixLength: IsUnset,
pub fn min_prefix_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMinPrefixLength<S>>where
S::MinPrefixLength: IsUnset,
Sourcepub fn maybe_min_prefix_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMinPrefixLength<S>>where
S::MinPrefixLength: IsUnset,
pub fn maybe_min_prefix_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMinPrefixLength<S>>where
S::MinPrefixLength: IsUnset,
Sourcepub fn max_name_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMaxNameLength<S>>where
S::MaxNameLength: IsUnset,
pub fn max_name_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMaxNameLength<S>>where
S::MaxNameLength: IsUnset,
Sourcepub fn maybe_max_name_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMaxNameLength<S>>where
S::MaxNameLength: IsUnset,
pub fn maybe_max_name_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMaxNameLength<S>>where
S::MaxNameLength: IsUnset,
Sourcepub fn min_name_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMinNameLength<S>>where
S::MinNameLength: IsUnset,
pub fn min_name_length(
self,
value: usize,
) -> ApiKeyPluginBuilder<SetMinNameLength<S>>where
S::MinNameLength: IsUnset,
Sourcepub fn maybe_min_name_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMinNameLength<S>>where
S::MinNameLength: IsUnset,
pub fn maybe_min_name_length(
self,
value: Option<usize>,
) -> ApiKeyPluginBuilder<SetMinNameLength<S>>where
S::MinNameLength: IsUnset,
Sourcepub fn require_name(self, value: bool) -> ApiKeyPluginBuilder<SetRequireName<S>>where
S::RequireName: IsUnset,
pub fn require_name(self, value: bool) -> ApiKeyPluginBuilder<SetRequireName<S>>where
S::RequireName: IsUnset,
Sourcepub fn maybe_require_name(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetRequireName<S>>where
S::RequireName: IsUnset,
pub fn maybe_require_name(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetRequireName<S>>where
S::RequireName: IsUnset,
Sourcepub fn enable_metadata(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetEnableMetadata<S>>where
S::EnableMetadata: IsUnset,
pub fn enable_metadata(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetEnableMetadata<S>>where
S::EnableMetadata: IsUnset,
Sourcepub fn maybe_enable_metadata(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetEnableMetadata<S>>where
S::EnableMetadata: IsUnset,
pub fn maybe_enable_metadata(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetEnableMetadata<S>>where
S::EnableMetadata: IsUnset,
Sourcepub fn key_expiration(
self,
value: KeyExpirationConfig,
) -> ApiKeyPluginBuilder<SetKeyExpiration<S>>where
S::KeyExpiration: IsUnset,
pub fn key_expiration(
self,
value: KeyExpirationConfig,
) -> ApiKeyPluginBuilder<SetKeyExpiration<S>>where
S::KeyExpiration: IsUnset,
Sourcepub fn maybe_key_expiration(
self,
value: Option<KeyExpirationConfig>,
) -> ApiKeyPluginBuilder<SetKeyExpiration<S>>where
S::KeyExpiration: IsUnset,
pub fn maybe_key_expiration(
self,
value: Option<KeyExpirationConfig>,
) -> ApiKeyPluginBuilder<SetKeyExpiration<S>>where
S::KeyExpiration: IsUnset,
Sourcepub fn rate_limit(
self,
value: RateLimitDefaults,
) -> ApiKeyPluginBuilder<SetRateLimit<S>>where
S::RateLimit: IsUnset,
pub fn rate_limit(
self,
value: RateLimitDefaults,
) -> ApiKeyPluginBuilder<SetRateLimit<S>>where
S::RateLimit: IsUnset,
Sourcepub fn maybe_rate_limit(
self,
value: Option<RateLimitDefaults>,
) -> ApiKeyPluginBuilder<SetRateLimit<S>>where
S::RateLimit: IsUnset,
pub fn maybe_rate_limit(
self,
value: Option<RateLimitDefaults>,
) -> ApiKeyPluginBuilder<SetRateLimit<S>>where
S::RateLimit: IsUnset,
Sourcepub fn enable_session_for_api_keys(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetEnableSessionForApiKeys<S>>where
S::EnableSessionForApiKeys: IsUnset,
pub fn enable_session_for_api_keys(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetEnableSessionForApiKeys<S>>where
S::EnableSessionForApiKeys: IsUnset,
Sourcepub fn maybe_enable_session_for_api_keys(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetEnableSessionForApiKeys<S>>where
S::EnableSessionForApiKeys: IsUnset,
pub fn maybe_enable_session_for_api_keys(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetEnableSessionForApiKeys<S>>where
S::EnableSessionForApiKeys: IsUnset,
Sourcepub fn storage(self, value: ApiKeyStorage) -> ApiKeyPluginBuilder<SetStorage<S>>where
S::Storage: IsUnset,
pub fn storage(self, value: ApiKeyStorage) -> ApiKeyPluginBuilder<SetStorage<S>>where
S::Storage: IsUnset,
Sourcepub fn maybe_storage(
self,
value: Option<ApiKeyStorage>,
) -> ApiKeyPluginBuilder<SetStorage<S>>where
S::Storage: IsUnset,
pub fn maybe_storage(
self,
value: Option<ApiKeyStorage>,
) -> ApiKeyPluginBuilder<SetStorage<S>>where
S::Storage: IsUnset,
Sourcepub fn custom_storage(
self,
value: Arc<dyn SecondaryStorage>,
) -> ApiKeyPluginBuilder<SetCustomStorage<S>>where
S::CustomStorage: IsUnset,
pub fn custom_storage(
self,
value: Arc<dyn SecondaryStorage>,
) -> ApiKeyPluginBuilder<SetCustomStorage<S>>where
S::CustomStorage: IsUnset,
Sourcepub fn maybe_custom_storage(
self,
value: Option<Arc<dyn SecondaryStorage>>,
) -> ApiKeyPluginBuilder<SetCustomStorage<S>>where
S::CustomStorage: IsUnset,
pub fn maybe_custom_storage(
self,
value: Option<Arc<dyn SecondaryStorage>>,
) -> ApiKeyPluginBuilder<SetCustomStorage<S>>where
S::CustomStorage: IsUnset,
Sourcepub fn fallback_to_database(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetFallbackToDatabase<S>>where
S::FallbackToDatabase: IsUnset,
pub fn fallback_to_database(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetFallbackToDatabase<S>>where
S::FallbackToDatabase: IsUnset,
Sourcepub fn maybe_fallback_to_database(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetFallbackToDatabase<S>>where
S::FallbackToDatabase: IsUnset,
pub fn maybe_fallback_to_database(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetFallbackToDatabase<S>>where
S::FallbackToDatabase: IsUnset,
Sourcepub fn defer_updates(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetDeferUpdates<S>>where
S::DeferUpdates: IsUnset,
pub fn defer_updates(
self,
value: bool,
) -> ApiKeyPluginBuilder<SetDeferUpdates<S>>where
S::DeferUpdates: IsUnset,
Sourcepub fn maybe_defer_updates(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetDeferUpdates<S>>where
S::DeferUpdates: IsUnset,
pub fn maybe_defer_updates(
self,
value: Option<bool>,
) -> ApiKeyPluginBuilder<SetDeferUpdates<S>>where
S::DeferUpdates: IsUnset,
Auto Trait Implementations§
impl<S = Empty> !RefUnwindSafe for ApiKeyPluginBuilder<S>
impl<S = Empty> !UnwindSafe for ApiKeyPluginBuilder<S>
impl<S> Freeze for ApiKeyPluginBuilder<S>
impl<S> Send for ApiKeyPluginBuilder<S>
impl<S> Sync for ApiKeyPluginBuilder<S>
impl<S> Unpin for ApiKeyPluginBuilder<S>
impl<S> UnsafeUnpin for ApiKeyPluginBuilder<S>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more