Struct octorust::auth::InstallationTokenGenerator
source · pub struct InstallationTokenGenerator {
pub installation_id: i64,
pub jwt_credential: Box<Credentials>,
/* private fields */
}
Expand description
A caching token “generator” which contains JWT credentials.
The authentication mechanism in the GitHub client library determines if the token is stale, and if so, uses the contained JWT credentials to fetch a new installation token.
The RwLock
Fields§
§installation_id: i64
§jwt_credential: Box<Credentials>
Implementations§
source§impl InstallationTokenGenerator
impl InstallationTokenGenerator
pub fn new( installation_id: i64, creds: JWTCredentials ) -> InstallationTokenGenerator
pub async fn token(&self) -> Option<String>
pub fn jwt(&self) -> &Credentials
Trait Implementations§
source§impl Clone for InstallationTokenGenerator
impl Clone for InstallationTokenGenerator
source§fn clone(&self) -> InstallationTokenGenerator
fn clone(&self) -> InstallationTokenGenerator
Returns a copy of the value. Read more
1.0.0 · 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 InstallationTokenGenerator
impl Debug for InstallationTokenGenerator
source§impl PartialEq<InstallationTokenGenerator> for InstallationTokenGenerator
impl PartialEq<InstallationTokenGenerator> for InstallationTokenGenerator
source§fn eq(&self, other: &InstallationTokenGenerator) -> bool
fn eq(&self, other: &InstallationTokenGenerator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
impl !RefUnwindSafe for InstallationTokenGenerator
impl Send for InstallationTokenGenerator
impl Sync for InstallationTokenGenerator
impl Unpin for InstallationTokenGenerator
impl !UnwindSafe for InstallationTokenGenerator
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