# WorkspacesClient

## pub struct WorkspacesClient

Thin wrapper around the workspace API, used during profile
validation to confirm that credentials can reach a workspace.

## Implementations

### impl WorkspacesClient

#### pub async fn list_workspaces(&self) -> Result<Vec<Workspace>>

List the workspaces the authenticated user can access,
sorted by display name (then RID).

#### pub async fn resolve_workspace(&self, workspace_rid: Option<&str>) -> Result<()>

Verify that the token can reach a workspace.
Only needs to check workspace *exists* and credentials are valid.
The profile config already stores the RID when one is provided.

## Trait implementations

**Auto traits**: [`Send`](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html), [`Sync`](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html), [`Unpin`](https://doc.rust-lang.org/1.98.1/core/marker/trait.Unpin.html), [`!UnwindSafe`](https://doc.rust-lang.org/1.98.1/core/panic/unwind_safe/trait.UnwindSafe.html), [`!RefUnwindSafe`](https://doc.rust-lang.org/1.98.1/core/panic/unwind_safe/trait.RefUnwindSafe.html)
