pub struct SetupBuilder { /* private fields */ }
Expand description
Setup configuration builder
Implementations§
Source§impl SetupBuilder
impl SetupBuilder
Sourcepub fn with_master_key(self, key: String) -> Self
pub fn with_master_key(self, key: String) -> Self
Set the master encryption key
Sourcepub fn with_env_master_key(self) -> Result<Self, SetupError>
pub fn with_env_master_key(self) -> Result<Self, SetupError>
Use an existing master key from the environment
Sourcepub fn with_storage(self, config: StorageConfig) -> Self
pub fn with_storage(self, config: StorageConfig) -> Self
Set the storage configuration
Sourcepub fn with_default_storage(self) -> Self
pub fn with_default_storage(self) -> Self
Use default file storage
Sourcepub fn with_validation(self, config: ValidationConfig) -> Self
pub fn with_validation(self, config: ValidationConfig) -> Self
Set validation configuration
Sourcepub fn with_admin_key(
self,
name: String,
ip_whitelist: Option<Vec<String>>,
) -> Self
pub fn with_admin_key( self, name: String, ip_whitelist: Option<Vec<String>>, ) -> Self
Configure admin key creation
Sourcepub fn skip_admin_key(self) -> Self
pub fn skip_admin_key(self) -> Self
Skip admin key creation
Sourcepub async fn build(self) -> Result<SetupResult, SetupError>
pub async fn build(self) -> Result<SetupResult, SetupError>
Build and initialize the authentication system
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetupBuilder
impl RefUnwindSafe for SetupBuilder
impl Send for SetupBuilder
impl Sync for SetupBuilder
impl Unpin for SetupBuilder
impl UnwindSafe for SetupBuilder
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