pub struct ClientRpcAccount<'a> { /* private fields */ }Expand description
account.* RPCs.
Implementations§
Source§impl<'a> ClientRpcAccount<'a>
impl<'a> ClientRpcAccount<'a>
Sourcepub async fn get_quota(&self) -> Result<AccountGetQuotaResult, Error>
pub async fn get_quota(&self) -> Result<AccountGetQuotaResult, Error>
Gets Copilot quota usage for the authenticated user or supplied GitHub token.
Wire method: account.getQuota.
§Returns
Quota usage snapshots for the resolved user, keyed by quota type.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_quota_with_params(
&self,
params: AccountGetQuotaRequest,
) -> Result<AccountGetQuotaResult, Error>
pub async fn get_quota_with_params( &self, params: AccountGetQuotaRequest, ) -> Result<AccountGetQuotaResult, Error>
Gets Copilot quota usage for the authenticated user or supplied GitHub token.
Wire method: account.getQuota.
§Parameters
params- Optional GitHub token used to look up quota for a specific user instead of the global auth context.
§Returns
Quota usage snapshots for the resolved user, keyed by quota type.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_current_auth(
&self,
) -> Result<AccountGetCurrentAuthResult, Error>
pub async fn get_current_auth( &self, ) -> Result<AccountGetCurrentAuthResult, Error>
Gets the currently active authentication credentials from the global auth manager.
Wire method: account.getCurrentAuth.
§Returns
Current authentication state
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_all_users(&self) -> Result<AccountGetAllUsersResult, Error>
pub async fn get_all_users(&self) -> Result<AccountGetAllUsersResult, Error>
Gets all authenticated users available for account switching.
Wire method: account.getAllUsers.
§Returns
List of all authenticated users
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn login(
&self,
params: AccountLoginRequest,
) -> Result<AccountLoginResult, Error>
pub async fn login( &self, params: AccountLoginRequest, ) -> Result<AccountLoginResult, Error>
Stores authentication credentials after successful login (e.g., device code flow).
Wire method: account.login.
§Parameters
params- Credentials to store after successful authentication
§Returns
Result of a successful login; throws on failure
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn logout(
&self,
params: AccountLogoutRequest,
) -> Result<AccountLogoutResult, Error>
pub async fn logout( &self, params: AccountLogoutRequest, ) -> Result<AccountLogoutResult, Error>
Removes user authentication from keychain and persisted state.
Wire method: account.logout.
§Parameters
params- User to log out
§Returns
Logout result indicating if more users remain
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for ClientRpcAccount<'a>
impl<'a> Clone for ClientRpcAccount<'a>
Source§fn clone(&self) -> ClientRpcAccount<'a>
fn clone(&self) -> ClientRpcAccount<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more