libvctrl_handler 5.2.0

Fundamental contracts for building a version control system – no implementations, only traits and types
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::errors::VctrlError;

pub trait Remote: Send + Sync {
    type RefSpec: Send + Sync;
    type RemoteRef: Send + Sync;

    fn list_refs(&self) -> Result<Vec<Self::RemoteRef>, VctrlError>;
    fn fetch(&mut self, refspecs: &[Self::RefSpec]) -> Result<(), VctrlError>;
    fn push(&mut self, refspecs: &[Self::RefSpec]) -> Result<(), VctrlError>;
}