Enum RemoteRepo

Source
pub enum RemoteRepo {
    Local(Local),
    Ssh(Ssh),
    Http(Http),
    LocalChannel(String),
    None,
}

Variants§

§

Local(Local)

§

Ssh(Ssh)

§

Http(Http)

§

LocalChannel(String)

§

None

Implementations§

Source§

impl RemoteRepo

Source

pub fn repo_name(&self) -> Result<Option<String>, Error>

Source

pub async fn finish(&mut self) -> Result<(), Error>

Source

pub async fn update_changelist<T: MutTxnTExt + TxnTExt + 'static>( &mut self, txn: &mut T, path: &[String], ) -> Result<Option<(HashSet<Position<Hash>>, RemoteRef<T>)>, Error>

Source

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.

Source

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.

Source

pub async fn archive<W: Write + Send + 'static>( &mut self, prefix: Option<String>, state: Option<(Merkle, &[Hash])>, umask: u16, w: W, ) -> Result<u64, Error>

Source

pub async fn upload_changes<T: MutTxnTExt + 'static>( &mut self, txn: &mut T, local: PathBuf, to_channel: Option<&str>, changes: &[CS], ) -> Result<(), Error>

Source

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.

Source

pub async fn update_identities<T: MutTxnTExt + TxnTExt + GraphIter>( &mut self, repo: &mut Repository, remote: &RemoteRef<T>, ) -> Result<(), Error>

Source

pub async fn prove(&mut self, key: SKey) -> Result<(), Error>

Source

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>

Source

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>

Source

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>

Source

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>

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,