pub struct SaTokenStateBuilder { /* private fields */ }Expand description
状态构建器
Implementations§
Source§impl SaTokenStateBuilder
impl SaTokenStateBuilder
pub fn new() -> Self
pub fn storage(self, storage: Arc<dyn SaStorage>) -> Self
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
Sourcepub fn token_style(self, style: TokenStyle) -> Self
pub fn token_style(self, style: TokenStyle) -> Self
设置 Token 风格
pub fn token_prefix(self, prefix: impl Into<String>) -> Self
pub fn jwt_secret_key(self, key: impl Into<String>) -> Self
pub fn build(self) -> Data<SaTokenState>
Trait Implementations§
Source§impl Default for SaTokenStateBuilder
impl Default for SaTokenStateBuilder
Source§fn default() -> SaTokenStateBuilder
fn default() -> SaTokenStateBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SaTokenStateBuilder
impl !RefUnwindSafe for SaTokenStateBuilder
impl Send for SaTokenStateBuilder
impl Sync for SaTokenStateBuilder
impl Unpin for SaTokenStateBuilder
impl !UnwindSafe for SaTokenStateBuilder
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