pub struct RefreshTokenFormatter { /* private fields */ }Expand description
Async callbacks that encode and decode refresh tokens returned to OAuth clients.
Implementations§
Source§impl RefreshTokenFormatter
impl RefreshTokenFormatter
pub fn new<Encode, EncodeFuture, Decode, DecodeFuture>(
encoder: Encode,
decoder: Decode,
) -> Selfwhere
Encode: Fn(RefreshTokenFormatEncodeInput) -> EncodeFuture + Send + Sync + 'static,
EncodeFuture: Future<Output = Result<String, RustAuthError>> + Send + 'static,
Decode: Fn(String) -> DecodeFuture + Send + Sync + 'static,
DecodeFuture: Future<Output = Result<RefreshTokenFormatDecodeOutput, RustAuthError>> + Send + 'static,
pub async fn encode( &self, input: RefreshTokenFormatEncodeInput, ) -> Result<String, RustAuthError>
pub async fn decode( &self, token: String, ) -> Result<RefreshTokenFormatDecodeOutput, RustAuthError>
Trait Implementations§
Source§impl Clone for RefreshTokenFormatter
impl Clone for RefreshTokenFormatter
Source§fn clone(&self) -> RefreshTokenFormatter
fn clone(&self) -> RefreshTokenFormatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RefreshTokenFormatter
impl Debug for RefreshTokenFormatter
impl Eq for RefreshTokenFormatter
Source§impl PartialEq for RefreshTokenFormatter
impl PartialEq for RefreshTokenFormatter
Auto Trait Implementations§
impl !RefUnwindSafe for RefreshTokenFormatter
impl !UnwindSafe for RefreshTokenFormatter
impl Freeze for RefreshTokenFormatter
impl Send for RefreshTokenFormatter
impl Sync for RefreshTokenFormatter
impl Unpin for RefreshTokenFormatter
impl UnsafeUnpin for RefreshTokenFormatter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.