pub struct OAuthContext {
pub scope: Vec<String>,
/* private fields */
}
Expand description
Scope context
Fields§
§scope: Vec<String>
Implementations§
Source§impl OAuthContext
impl OAuthContext
Sourcepub fn with_domain(token: &str, domain: &str) -> AnyResult<Self>
pub fn with_domain(token: &str, domain: &str) -> AnyResult<Self>
Create a OAuthContext
with token and domain
Sourcepub fn refresh(&mut self, token: Option<String>) -> AnyResult<()>
pub fn refresh(&mut self, token: Option<String>) -> AnyResult<()>
refresh OAuthContext with new token or when token permission changed in GitHub
Sourcepub fn get_scope_permissions(&self) -> GithubTokenScope
pub fn get_scope_permissions(&self) -> GithubTokenScope
return GitHub token scope as struct
Auto Trait Implementations§
impl Freeze for OAuthContext
impl !RefUnwindSafe for OAuthContext
impl Send for OAuthContext
impl Sync for OAuthContext
impl Unpin for OAuthContext
impl !UnwindSafe for OAuthContext
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