Trait AsyncWorkspaceService

Source
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 update_workspace(
        &self,
        auth_: BearerToken,
        rid: WorkspaceRid,
        request: UpdateWorkspaceRequest,
    ) -> 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§

Source

fn get_workspaces( &self, auth_: BearerToken, ) -> impl Future<Output = Result<BTreeSet<Workspace>, Error>> + Send

Gets all workspaces that the requesting user belongs to.

Source

fn get_workspace( &self, auth_: BearerToken, workspace_rid: WorkspaceRid, ) -> impl Future<Output = Result<Workspace, Error>> + Send

Gets the workspace with the specified WorkspaceRid.

Source

fn update_workspace( &self, auth_: BearerToken, rid: WorkspaceRid, request: UpdateWorkspaceRequest, ) -> impl Future<Output = Result<Workspace, Error>> + Send

Updates the settings of the workspace with the specified WorkspaceRid.

Source

fn get_default_workspace( &self, auth_: BearerToken, ) -> impl Future<Output = Result<Option<Workspace>, Error>> + Send

Gets the default workspace for the requesting user. If the user belongs to a single workspace, that workspace is returned. Otherwise, if the user’s organization has a default workspace and the user belongs to it, that will be returned.

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.

Implementors§