pub struct State {
pub access_token: String,
pub refresh_token: String,
pub expiration: DateTime<Local>,
}Expand description
The state of the Strava API client.
Callers should persist this state between API invocations to make sure that authorized access is working properly. The state is unique for a user, so multi-user applications should maintain one instance per user.
Fields§
§access_token: StringThe last access token received from the Strava API.
refresh_token: StringThe refresh token that was received with the stored access token.
expiration: DateTime<Local>The expiration time of the stored access token.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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