Skip to main content

WorktreeHandler

Trait WorktreeHandler 

Source
pub trait WorktreeHandler: CtlHandler {
Show 22 methods // Required methods fn handle_walk<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpWalk, ) -> Pin<Box<dyn Future<Output = Result<RWalk>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_open<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpOpen, ) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_create<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpCreate, ) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_read<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpRead, ) -> Pin<Box<dyn Future<Output = Result<RRead>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_write<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpWrite, ) -> Pin<Box<dyn Future<Output = Result<RWrite>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_clunk<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpClunk, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_remove<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpRemove, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_np_stat<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpStatReq, ) -> Pin<Box<dyn Future<Output = Result<RStat>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_wstat<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpWstat, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_flush<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpFlush, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_stage_all<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn handle_stage_files<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 StageFilesRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_stage_all_including_untracked<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn handle_commit<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 CommitRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_commit_with_author<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 CommitWithAuthorRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_amend_commit<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 AmendCommitRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_checkout<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 CheckoutRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_merge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 MergeRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_abort_merge<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn handle_continue_merge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 ContinueMergeRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn handle_quit_merge<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn handle_open_read<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpStatReq, ) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait;
}
Expand description

Generated handler trait for the nested worktree scope.

Required Methods§

Source

fn handle_walk<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpWalk, ) -> Pin<Box<dyn Future<Output = Result<RWalk>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Resolve path components to a fid (9P walk). Use the returned fid for open (I/O) or ctl operations (git log/diff/blame). Each use requires a separate fid.

Source

fn handle_open<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpOpen, ) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Open a walked fid for read/write I/O. After open, the fid can only be used for read/write — ctl operations (log, diff, blame) require a separate walked-not-opened fid.

Source

fn handle_create<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpCreate, ) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Create a file or directory under a walked directory fid. The fid is then opened for I/O on the new file.

Source

fn handle_read<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpRead, ) -> Pin<Box<dyn Future<Output = Result<RRead>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Read file content or directory listing at offset+count (bounded by iounit). For directories, returns entries as binary: name_len(u32) + name + is_dir(u8) + size(u64).

Source

fn handle_write<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpWrite, ) -> Pin<Box<dyn Future<Output = Result<RWrite>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Write data to an opened file at offset. Data size must not exceed iounit.

Source

fn handle_clunk<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpClunk, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Release a fid (like close). Frees server resources. Always clunk fids when done.

Source

fn handle_remove<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpRemove, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Remove a file or directory and release its fid.

Source

fn handle_np_stat<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpStatReq, ) -> Pin<Box<dyn Future<Output = Result<RStat>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Get file metadata (size, mode, timestamps). Works on both walked and opened fids.

Source

fn handle_wstat<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpWstat, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Modify file metadata (truncate, rename). Requires an opened fid for truncate.

Source

fn handle_flush<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpFlush, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Cancel a pending operation by its tag.

Source

fn handle_stage_all<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Stage all modified tracked files in this worktree

Source

fn handle_stage_files<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 StageFilesRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Stage specific files in this worktree

Source

fn handle_stage_all_including_untracked<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Stage all files including untracked in this worktree

Source

fn handle_commit<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 CommitRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Commit staged changes in this worktree

Source

fn handle_commit_with_author<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 CommitWithAuthorRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Commit staged changes with specified author

Source

fn handle_amend_commit<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 AmendCommitRequest, ) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Amend the last commit in this worktree

Source

fn handle_checkout<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 CheckoutRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Checkout a ref in this worktree

Source

fn handle_merge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 MergeRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Merge a branch into this worktree

Source

fn handle_abort_merge<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Abort an in-progress merge in this worktree

Source

fn handle_continue_merge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 ContinueMergeRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Continue a merge after resolving conflicts

Source

fn handle_quit_merge<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Exit merge state without committing

Source

fn handle_open_read<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, repo_id: &'life2 str, name: &'life3 str, data: &'life4 NpStatReq, ) -> Pin<Box<dyn Future<Output = Result<ROpen>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Open a walked fid for read-only I/O.

Implementors§