pub struct ForkRegistry { /* private fields */ }Implementations§
Source§impl ForkRegistry
impl ForkRegistry
pub fn new(config: ForkConfig) -> Result<Self>
pub fn start_cleanup_task(self: Arc<Self>)
pub fn create_fork( &self, base_path: &Path, workspace_root: &Path, ) -> Result<String>
pub fn get_fork(&self, fork_id: &str) -> Result<Arc<ForkContext>>
pub fn get_fork_path(&self, fork_id: &str) -> Option<PathBuf>
pub fn with_fork_mut<F, R>(&self, fork_id: &str, f: F) -> Result<R>
pub fn discard_fork(&self, fork_id: &str) -> Result<()>
pub fn save_fork( &self, fork_id: &str, target_path: &Path, workspace_root: &Path, drop_fork: bool, ) -> Result<()>
pub fn ttl(&self) -> Duration
pub fn list_forks(&self) -> Vec<ForkInfo>
pub fn create_checkpoint( &self, fork_id: &str, label: Option<String>, ) -> Result<Checkpoint>
pub fn list_checkpoints(&self, fork_id: &str) -> Result<Vec<Checkpoint>>
pub fn delete_checkpoint( &self, fork_id: &str, checkpoint_id: &str, ) -> Result<()>
pub fn restore_checkpoint( &self, fork_id: &str, checkpoint_id: &str, ) -> Result<Checkpoint>
pub fn add_staged_change( &self, fork_id: &str, staged: StagedChange, ) -> Result<()>
pub fn list_staged_changes(&self, fork_id: &str) -> Result<Vec<StagedChange>>
pub fn take_staged_change( &self, fork_id: &str, change_id: &str, ) -> Result<StagedChange>
pub fn discard_staged_change( &self, fork_id: &str, change_id: &str, ) -> Result<()>
Auto Trait Implementations§
impl !Freeze for ForkRegistry
impl !RefUnwindSafe for ForkRegistry
impl Send for ForkRegistry
impl Sync for ForkRegistry
impl Unpin for ForkRegistry
impl UnsafeUnpin for ForkRegistry
impl UnwindSafe for ForkRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more