Skip to main content

WorkspaceFs

Trait WorkspaceFs 

Source
pub trait WorkspaceFs:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn list_dir<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        root: &'life1 WorkspaceRoot,
        path: &'life2 RelPath,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn read_file<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        root: &'life1 WorkspaceRoot,
        path: &'life2 RelPath,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Read-only workspace filesystem.

Every access is scoped to a WorkspaceRoot. Write access is deliberately excluded from this contract — destructive operations need their own port and their own permission (ADR-0007).

Required Methods§

Source

fn list_dir<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, root: &'life1 WorkspaceRoot, path: &'life2 RelPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List the contents of a directory within root.

Source

fn read_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, root: &'life1 WorkspaceRoot, path: &'life2 RelPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Read the contents of a file within root.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§