pub enum RemoteRepo {
Local(Local),
Ssh(Ssh),
Http(Http),
LocalChannel(String),
None,
}
Variants§
Implementations§
Source§impl RemoteRepo
impl RemoteRepo
pub fn repo_name(&self) -> Result<Option<String>, Error>
pub async fn finish(&mut self) -> Result<(), Error>
pub async fn update_changelist<T: MutTxnTExt + TxnTExt + 'static>( &mut self, txn: &mut T, path: &[String], ) -> Result<Option<(HashSet<Position<Hash>>, RemoteRef<T>)>, Error>
Sourcepub async fn update_changelist_pushpull(
&mut self,
txn: &mut MutTxn<()>,
path: &[String],
current_channel: &ChannelRef<MutTxn<()>>,
force_cache: Option<bool>,
repo: &Repository,
specific_changes: &[String],
is_pull: bool,
) -> Result<RemoteDelta<MutTxn<()>>, Error>
pub async fn update_changelist_pushpull( &mut self, txn: &mut MutTxn<()>, path: &[String], current_channel: &ChannelRef<MutTxn<()>>, force_cache: Option<bool>, repo: &Repository, specific_changes: &[String], is_pull: bool, ) -> Result<RemoteDelta<MutTxn<()>>, Error>
Creates a RemoteDelta
.
IF:
the RemoteRepo is a RemoteRepo::LocalChannel
, delegate to
the simpler method update_changelist_local_channel
, returning the
to_download
list of changes.
ELSE:
calculate the to_download
list of changes. Additionally, if there are
no remote unrecords, update the local remote cache. If there are remote unrecords,
calculate and return information about the difference between our cached version
of the remote, and their version of the remote.
Sourcepub async fn download_changelist_nocache(
&mut self,
from: u64,
paths: &[String],
) -> Result<(HashSet<Position<Hash>>, Vec<(u64, Hash, Merkle, bool)>), Error>
pub async fn download_changelist_nocache( &mut self, from: u64, paths: &[String], ) -> Result<(HashSet<Position<Hash>>, Vec<(u64, Hash, Merkle, bool)>), Error>
Get the list of the remote’s changes that come after from: u64
.
Instead of immediately updating the local cache of the remote, return
the change info without changing the cache.
pub async fn archive<W: Write + Send + 'static>( &mut self, prefix: Option<String>, state: Option<(Merkle, &[Hash])>, umask: u16, w: W, ) -> Result<u64, Error>
pub async fn upload_changes<T: MutTxnTExt + 'static>( &mut self, txn: &mut T, local: PathBuf, to_channel: Option<&str>, changes: &[CS], ) -> Result<(), Error>
Sourcepub async fn download_changes(
&mut self,
progress_bar: ProgressBar,
hashes: &mut UnboundedReceiver<CS>,
send: &mut Sender<(CS, bool)>,
path: &mut PathBuf,
full: bool,
) -> Result<bool, Error>
pub async fn download_changes( &mut self, progress_bar: ProgressBar, hashes: &mut UnboundedReceiver<CS>, send: &mut Sender<(CS, bool)>, path: &mut PathBuf, full: bool, ) -> Result<bool, Error>
Start (and possibly complete) the download of a change.
pub async fn update_identities<T: MutTxnTExt + TxnTExt + GraphIter>( &mut self, repo: &mut Repository, remote: &RemoteRef<T>, ) -> Result<(), Error>
pub async fn prove(&mut self, key: SKey) -> Result<(), Error>
pub async fn pull<T: MutTxnTExt + TxnTExt + GraphIter + 'static>( &mut self, repo: &mut Repository, txn: &mut T, channel: &mut ChannelRef<T>, to_apply: &[CS], inodes: &HashSet<Position<Hash>>, do_apply: bool, ) -> Result<Vec<CS>, Error>
pub async fn clone_tag<T: MutTxnTExt + TxnTExt + GraphIter + 'static>( &mut self, repo: &mut Repository, txn: &mut T, channel: &mut ChannelRef<T>, tag: &[Hash], ) -> Result<(), Error>
pub async fn clone_state<T: MutTxnTExt + TxnTExt + GraphIter + 'static>( &mut self, repo: &mut Repository, txn: &mut T, channel: &mut ChannelRef<T>, state: Merkle, ) -> Result<(), Error>
pub async fn complete_changes<T: MutTxnT + TxnTExt + GraphIter>( &mut self, repo: &Repository, txn: &T, local_channel: &mut ChannelRef<T>, changes: &[CS], full: bool, ) -> Result<(), Error>
pub async fn clone_channel<T: MutTxnTExt + TxnTExt + GraphIter + 'static>( &mut self, repo: &mut Repository, txn: &mut T, local_channel: &mut ChannelRef<T>, path: &[String], ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for RemoteRepo
impl !RefUnwindSafe for RemoteRepo
impl Send for RemoteRepo
impl Sync for RemoteRepo
impl Unpin for RemoteRepo
impl !UnwindSafe for RemoteRepo
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