pub struct JWT { /* private fields */ }
Implementations§
Source§impl JWT
impl JWT
pub fn generate_token( &self, uid: String, expiration: u64, claims: Option<Value>, ) -> AuthResult<String>
pub fn validate(&self, token: &str) -> AuthResult<TokenData<UserClaims>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JWT
impl RefUnwindSafe for JWT
impl Send for JWT
impl Sync for JWT
impl Unpin for JWT
impl UnwindSafe for JWT
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