pub struct LastLoginMethodOptions {
pub cookie_name: Option<String>,
pub max_age: Option<u64>,
pub resolver: Option<Arc<dyn Fn(&LoginMethodContext) -> Option<String> + Send + Sync + 'static>>,
pub store_in_database: bool,
pub database_field_name: Option<String>,
}Expand description
Configuration for tracking the most recent successful login method.
Fields§
§max_age: Option<u64>§resolver: Option<Arc<dyn Fn(&LoginMethodContext) -> Option<String> + Send + Sync + 'static>>§store_in_database: bool§database_field_name: Option<String>Implementations§
Source§impl LastLoginMethodOptions
impl LastLoginMethodOptions
pub fn max_age(self, max_age: u64) -> Self
pub fn with_resolver<F>(self, resolver: F) -> Self
pub fn store_in_database(self, store_in_database: bool) -> Self
pub fn database_field_name(self, field_name: impl Into<String>) -> Self
pub fn effective_max_age(&self) -> u64
pub fn effective_database_field_name(&self) -> &str
pub fn resolve_login_method( &self, context: &LoginMethodContext, ) -> Option<String>
Trait Implementations§
Source§impl Clone for LastLoginMethodOptions
impl Clone for LastLoginMethodOptions
Source§fn clone(&self) -> LastLoginMethodOptions
fn clone(&self) -> LastLoginMethodOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LastLoginMethodOptions
impl Default for LastLoginMethodOptions
Source§fn default() -> LastLoginMethodOptions
fn default() -> LastLoginMethodOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LastLoginMethodOptions
impl !RefUnwindSafe for LastLoginMethodOptions
impl Send for LastLoginMethodOptions
impl Sync for LastLoginMethodOptions
impl Unpin for LastLoginMethodOptions
impl UnsafeUnpin for LastLoginMethodOptions
impl !UnwindSafe for LastLoginMethodOptions
Blanket Implementations§
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