pub struct Builder<D, U, P, S, B> { /* private fields */ }Expand description
Collects configuration. .build() only exists once secret, base_url and database
are set: the last three type parameters track that.
Implementations§
Source§impl<D, U, P, S, B> Builder<D, U, P, S, B>
impl<D, U, P, S, B> Builder<D, U, P, S, B>
Sourcepub fn secret(self, secret: Secret) -> Builder<D, U, P, Present, B>
pub fn secret(self, secret: Secret) -> Builder<D, U, P, Present, B>
The master secret (at least 32 bytes). See Secret::from_env.
Sourcepub fn secrets(
self,
secrets: impl IntoIterator<Item = Secret>,
) -> Builder<D, U, P, Present, B>
pub fn secrets( self, secrets: impl IntoIterator<Item = Secret>, ) -> Builder<D, U, P, Present, B>
Several secrets for rotation: the first signs, all verify.
Sourcepub fn base_url(self, url: impl Into<String>) -> Builder<D, U, P, S, Present>
pub fn base_url(self, url: impl Into<String>) -> Builder<D, U, P, S, Present>
The public URL of the app, e.g. https://acme.dk.
pub fn app_name(self, name: impl Into<String>) -> Self
Sourcepub fn base_path(self, path: impl Into<String>) -> Self
pub fn base_path(self, path: impl Into<String>) -> Self
Where auth routes live (default /api/auth).
Sourcepub fn trusted_origins(
self,
origins: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn trusted_origins( self, origins: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Origins allowed to make cookie-carrying requests and to be redirect targets.
pub fn email_password(self, config: EmailPassword) -> Self
pub fn email_verification(self, config: EmailVerification) -> Self
pub fn session(self, config: SessionConfig) -> Self
pub fn rate_limit(self, config: RateLimit) -> Self
pub fn client_ip(self, source: ClientIp) -> Self
pub fn mailer(self, mailer: impl Mailer) -> Self
Sourcepub fn user_fields<U2: Fields>(self) -> Builder<D, U2, P, S, B>
pub fn user_fields<U2: Fields>(self) -> Builder<D, U2, P, S, B>
The app’s own columns on user.
Source§impl<U, P, S, B> Builder<NoDatabase, U, P, S, B>
impl<U, P, S, B> Builder<NoDatabase, U, P, S, B>
Trait Implementations§
Auto Trait Implementations§
impl<D, U, P, S, B> !RefUnwindSafe for Builder<D, U, P, S, B>
impl<D, U, P, S, B> !Sync for Builder<D, U, P, S, B>
impl<D, U, P, S, B> !UnwindSafe for Builder<D, U, P, S, B>
impl<D, U, P, S, B> Forget for Builder<D, U, P, S, B>
impl<D, U, P, S, B> Freeze for Builder<D, U, P, S, B>
impl<D, U, P, S, B> Move for Builder<D, U, P, S, B>
impl<D, U, P, S, B> Send for Builder<D, U, P, S, B>
impl<D, U, P, S, B> Unpin for Builder<D, U, P, S, B>
impl<D, U, P, S, B> UnsafeUnpin for Builder<D, U, P, S, B>where
D: UnsafeUnpin,
P: UnsafeUnpin,
Vec<Box<dyn FnOnce(&mut PluginBuilder<'_, D>) + Send>>: UnsafeUnpin,
PhantomData<fn() -> (U, S, B)>: UnsafeUnpin,
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