pub trait AsyncWorkspaceService {
// Required methods
fn get_workspaces(
&self,
auth_: BearerToken,
) -> impl Future<Output = Result<BTreeSet<Workspace>, Error>> + Send;
fn get_workspace(
&self,
auth_: BearerToken,
workspace_rid: WorkspaceRid,
) -> impl Future<Output = Result<Workspace, Error>> + Send;
fn get_default_workspace(
&self,
auth_: BearerToken,
) -> impl Future<Output = Result<Option<Workspace>, Error>> + Send;
}Expand description
This service provides information about workspaces. Workspaces provide access control boundaries. All resources in Nominal live within a workspace.
Required Methods§
Sourcefn get_workspaces(
&self,
auth_: BearerToken,
) -> impl Future<Output = Result<BTreeSet<Workspace>, Error>> + Send
fn get_workspaces( &self, auth_: BearerToken, ) -> impl Future<Output = Result<BTreeSet<Workspace>, Error>> + Send
Gets all workspaces that the requesting user belongs to.
Sourcefn get_workspace(
&self,
auth_: BearerToken,
workspace_rid: WorkspaceRid,
) -> impl Future<Output = Result<Workspace, Error>> + Send
fn get_workspace( &self, auth_: BearerToken, workspace_rid: WorkspaceRid, ) -> impl Future<Output = Result<Workspace, Error>> + Send
Gets the workspace with the specified WorkspaceRid.
Sourcefn get_default_workspace(
&self,
auth_: BearerToken,
) -> impl Future<Output = Result<Option<Workspace>, Error>> + Send
fn get_default_workspace( &self, auth_: BearerToken, ) -> impl Future<Output = Result<Option<Workspace>, Error>> + Send
Gets the default workspace for the requesting user. It may not be present if the user does not have access to any workspaces or no default workspace is configured for the user’s organization.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.