pub struct Token<Scope> { /* private fields */ }
Expand description
Authentication token for GitHub Apps
GitHub uses tokens to authenticate requests against against its API. For GitHub Apps, there are two different kinds of tokens. Both grant the app a different scope, namely the app or the installation scope. When the app wants to request resources as itself, it uses the app scope. If it wants to impersonate an installation and access its resource, it uses the installation scope.
The Token
struct is an abstraction around these different tokens. It uses a marker type to
indicate what scope it has so that the Rust compiler can ensure that the token matches the
required scope.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Scope> Freeze for Token<Scope>
impl<Scope> RefUnwindSafe for Token<Scope>where
Scope: RefUnwindSafe,
impl<Scope> Send for Token<Scope>where
Scope: Send,
impl<Scope> Sync for Token<Scope>where
Scope: Sync,
impl<Scope> Unpin for Token<Scope>where
Scope: Unpin,
impl<Scope> UnwindSafe for Token<Scope>where
Scope: UnwindSafe,
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