Skip to main content

LocalAsyncWorkspaceService

Trait LocalAsyncWorkspaceService 

Source
pub trait LocalAsyncWorkspaceService<I: Stream<Item = Result<Bytes, Error>>> {
    // Required methods
    fn get_workspaces(
        &self,
        auth_: &BearerToken,
    ) -> impl Future<Output = Result<BTreeSet<Workspace>, Error>>;
    fn get_workspace(
        &self,
        auth_: &BearerToken,
        workspace_rid: &WorkspaceRid,
    ) -> impl Future<Output = Result<Workspace, Error>>;
    fn update_workspace(
        &self,
        auth_: &BearerToken,
        rid: &WorkspaceRid,
        request: &UpdateWorkspaceRequest,
    ) -> impl Future<Output = Result<Workspace, Error>>;
    fn get_default_workspace(
        &self,
        auth_: &BearerToken,
    ) -> impl Future<Output = Result<Option<Workspace>, Error>>;
}
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>>

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>>

Gets the workspace with the specified WorkspaceRid.

Source

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

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>>

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§

Source§

impl<I: Stream<Item = Result<Bytes, Error>>, __C> LocalAsyncWorkspaceService<I> for LocalAsyncWorkspaceServiceClient<__C>
where __C: LocalAsyncClient<ResponseBody = I>,