pub struct LocalSync { /* private fields */ }Expand description
Synchronize objects from a local source repository to a target repository.
Implementations§
Source§impl LocalSync
impl LocalSync
Sourcepub fn source(&self) -> &Repository
pub fn source(&self) -> &Repository
Get the source repository.
Sourcepub fn list_threads(&self) -> Result<Vec<(String, ChangeId)>>
pub fn list_threads(&self) -> Result<Vec<(String, ChangeId)>>
List all threads in the source repository.
Sourcepub fn list_markers(&self) -> Result<Vec<(String, ChangeId)>>
pub fn list_markers(&self) -> Result<Vec<(String, ChangeId)>>
List all markers in the source repository.
Sourcepub fn fetch_state(
&self,
target: &Repository,
state_id: &ChangeId,
) -> Result<usize>
pub fn fetch_state( &self, target: &Repository, state_id: &ChangeId, ) -> Result<usize>
Fetch a state and all its dependencies from source to target.
Sourcepub fn fetch_state_with_depth(
&self,
target: &Repository,
state_id: &ChangeId,
depth: u32,
) -> Result<usize>
pub fn fetch_state_with_depth( &self, target: &Repository, state_id: &ChangeId, depth: u32, ) -> Result<usize>
Fetch a state with limited depth (shallow clone).
Depth 1 means the target state and its immediate parents. A depth of 0 should be treated by callers as “full history”.
Sourcepub fn copy_blob(&self, target: &Repository, hash: &ContentHash) -> Result<bool>
pub fn copy_blob(&self, target: &Repository, hash: &ContentHash) -> Result<bool>
Copy a specific blob from source to target.
Auto Trait Implementations§
impl !Freeze for LocalSync
impl !RefUnwindSafe for LocalSync
impl !UnwindSafe for LocalSync
impl Send for LocalSync
impl Sync for LocalSync
impl Unpin for LocalSync
impl UnsafeUnpin for LocalSync
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request