#[non_exhaustive]pub struct TokenPair {
pub access: AccessToken,
pub refresh: RefreshToken,
pub expires_in: Duration,
pub token_type: String,
}Expand description
Access token together with the refresh token that renews it.
Both tokens are redacted in Debug output.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.access: AccessTokenToken authorising access to trading accounts.
refresh: RefreshTokenToken exchanged for the next pair.
expires_in: DurationTime the access token stays valid, counted from the refresh.
token_type: StringKind of the access token, bearer in practice.
Trait Implementations§
impl Eq for TokenPair
impl StructuralPartialEq for TokenPair
Source§impl TryFrom<ProtoOaRefreshTokenRes> for TokenPair
impl TryFrom<ProtoOaRefreshTokenRes> for TokenPair
Source§type Error = TokenError
type Error = TokenError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for TokenPair
impl Freeze for TokenPair
impl Move for TokenPair
impl RefUnwindSafe for TokenPair
impl Send for TokenPair
impl Sync for TokenPair
impl Unpin for TokenPair
impl UnsafeUnpin for TokenPair
impl UnwindSafe for TokenPair
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