Skip to main content

WorkspaceAdmin

Trait WorkspaceAdmin 

Source
pub trait WorkspaceAdmin: Send + Sync {
    // Required methods
    fn create_workspace<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = FsResult<Workspace>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_workspace<'life0, 'async_trait>(
        &'life0 self,
        id: WorkspaceId,
    ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Workspace lifecycle operations. Not part of fslite_core::FileSystem (creating/naming a workspace is backend-specific), so fslite-server defines its own narrow trait and adapts each backend to it explicitly rather than downcasting Arc<dyn FileSystem>.

Required Methods§

Source

fn create_workspace<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FsResult<Workspace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates a new isolated workspace with default limits.

Source

fn delete_workspace<'life0, 'async_trait>( &'life0 self, id: WorkspaceId, ) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Permanently deletes a workspace and everything it contains.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§