pub struct SaTokenConfigBuilder { /* private fields */ }Expand description
配置构建器
Implementations§
Source§impl SaTokenConfigBuilder
impl SaTokenConfigBuilder
pub fn token_name(self, name: impl Into<String>) -> Self
pub fn timeout(self, timeout: i64) -> Self
pub fn active_timeout(self, timeout: i64) -> Self
Sourcepub fn auto_renew(self, enabled: bool) -> Self
pub fn auto_renew(self, enabled: bool) -> Self
设置是否开启自动续签
pub fn is_concurrent(self, concurrent: bool) -> Self
pub fn token_style(self, style: TokenStyle) -> Self
pub fn token_prefix(self, prefix: impl Into<String>) -> Self
pub fn jwt_secret_key(self, key: impl Into<String>) -> Self
Sourcepub fn build(self) -> SaTokenManager
pub fn build(self) -> SaTokenManager
Sourcepub fn build_config(self) -> SaTokenConfig
pub fn build_config(self) -> SaTokenConfig
仅构建配置(不创建 Manager)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SaTokenConfigBuilder
impl !RefUnwindSafe for SaTokenConfigBuilder
impl Send for SaTokenConfigBuilder
impl Sync for SaTokenConfigBuilder
impl Unpin for SaTokenConfigBuilder
impl !UnwindSafe for SaTokenConfigBuilder
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