pub struct CopilotOAuth {
pub github_url: Option<String>,
pub api_url: Option<String>,
}Expand description
The Copilot sign-in. Endpoints derive from the GitHub domain unless overridden.
Fields§
§github_url: Option<String>Replaces https://<domain> and https://api.<domain> for GitHub calls.
api_url: Option<String>Replaces the Copilot API base URL.
Trait Implementations§
Source§impl Clone for CopilotOAuth
impl Clone for CopilotOAuth
Source§impl Debug for CopilotOAuth
impl Debug for CopilotOAuth
Source§impl Default for CopilotOAuth
impl Default for CopilotOAuth
Source§impl OAuthProvider for CopilotOAuth
impl OAuthProvider for CopilotOAuth
Source§fn login<'a>(
&'a self,
interaction: &'a Interaction,
_options: &'a LoginOptions,
) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
fn login<'a>( &'a self, interaction: &'a Interaction, _options: &'a LoginOptions, ) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
Runs the sign-in.
Source§fn refresh<'a>(
&'a self,
credential: &'a OAuthCredential,
cancel: &'a CancellationToken,
) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
fn refresh<'a>( &'a self, credential: &'a OAuthCredential, cancel: &'a CancellationToken, ) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
Exchanges the refresh token for a new credential.
Source§fn to_auth<'a>(
&'a self,
credential: &'a OAuthCredential,
) -> BoxFuture<'a, Result<OAuthAuth, AuthError>>
fn to_auth<'a>( &'a self, credential: &'a OAuthCredential, ) -> BoxFuture<'a, Result<OAuthAuth, AuthError>>
Request credentials for a valid token.
Source§fn login_label(&self) -> Option<&str>
fn login_label(&self) -> Option<&str>
Label of the login menu entry, when the provider sets one.
Source§fn is_subscription(&self) -> bool
fn is_subscription(&self) -> bool
Whether the account is a subscription, which the login menu labels.
Auto Trait Implementations§
impl Forget for CopilotOAuth
impl Freeze for CopilotOAuth
impl RefUnwindSafe for CopilotOAuth
impl Send for CopilotOAuth
impl Sync for CopilotOAuth
impl Unpin for CopilotOAuth
impl UnsafeUnpin for CopilotOAuth
impl UnwindSafe for CopilotOAuth
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