pub struct AllowThemBuilder { /* private fields */ }Expand description
Builder for constructing a configured AllowThem handle.
Implementations§
Source§impl AllowThemBuilder
impl AllowThemBuilder
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Start building from a database URL.
At build time, calls Db::connect(url) which creates the pool,
sets pragmas (foreign_keys, WAL, busy_timeout), and runs migrations.
Sourcepub fn with_pool(pool: SqlitePool) -> Self
pub fn with_pool(pool: SqlitePool) -> Self
Start building from an existing pool.
At build time, calls Db::new(pool) which runs migrations.
The caller is responsible for pragma configuration on their pool.
Sourcepub fn session_ttl(self, ttl: Duration) -> Self
pub fn session_ttl(self, ttl: Duration) -> Self
Override session TTL. Default: 24 hours.
Override session cookie name. Default: "allowthem_session".
Set the Secure attribute on session cookies.
Default: true. Set to false for local development over HTTP.
Set the Domain attribute on session cookies.
Default: empty (omitted). When set, the cookie is sent to the domain and all its subdomains.
Auto Trait Implementations§
impl Freeze for AllowThemBuilder
impl !RefUnwindSafe for AllowThemBuilder
impl Send for AllowThemBuilder
impl Sync for AllowThemBuilder
impl Unpin for AllowThemBuilder
impl UnsafeUnpin for AllowThemBuilder
impl !UnwindSafe for AllowThemBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more