pub trait ForkProvider:
Send
+ Sync
+ 'static {
// Required methods
fn descriptor(&self) -> ForkProviderDescriptor;
fn create_fork<'life0, 'async_trait>(
&'life0 self,
request: ForkRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceFork>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_forks<'life0, 'life1, 'async_trait>(
&'life0 self,
source_workspace: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceFork>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resume_fork<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ForkId,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceFork>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_fork<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ForkId,
policy: RemoveForkPolicy,
) -> Pin<Box<dyn Future<Output = Result<RemoveForkResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Provider contract for workspace forks. Registered through the extension
registry (ProvidedService::ForkProvider); providers declare their
capabilities and must not assume ambient authority beyond them.
Required Methods§
fn descriptor(&self) -> ForkProviderDescriptor
fn create_fork<'life0, 'async_trait>(
&'life0 self,
request: ForkRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceFork>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_forks<'life0, 'life1, 'async_trait>(
&'life0 self,
source_workspace: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceFork>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_forks<'life0, 'life1, 'async_trait>(
&'life0 self,
source_workspace: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceFork>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists forks of source_workspace known to this provider.
Sourcefn resume_fork<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ForkId,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceFork>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resume_fork<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ForkId,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceFork>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Re-resolves a fork by id (e.g. after restart), reporting Missing
status when its workspace disappeared out-of-band.
fn remove_fork<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ForkId,
policy: RemoveForkPolicy,
) -> Pin<Box<dyn Future<Output = Result<RemoveForkResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".