Struct jj_lib::repo::RepoLoader
source · pub struct RepoLoader { /* private fields */ }
Implementations§
source§impl RepoLoader
impl RepoLoader
pub fn new( repo_path: PathBuf, repo_settings: RepoSettings, store: Arc<Store>, op_store: Arc<dyn OpStore>, op_heads_store: Arc<dyn OpHeadsStore>, index_store: Arc<dyn IndexStore>, submodule_store: Arc<dyn SubmoduleStore>, ) -> Self
pub fn init( user_settings: &UserSettings, repo_path: &Path, store_factories: &StoreFactories, ) -> Result<Self, StoreLoadError>
pub fn repo_path(&self) -> &PathBuf
pub fn store(&self) -> &Arc<Store>
pub fn index_store(&self) -> &Arc<dyn IndexStore>
pub fn op_store(&self) -> &Arc<dyn OpStore>
pub fn op_heads_store(&self) -> &Arc<dyn OpHeadsStore>
pub fn load_at_head( &self, user_settings: &UserSettings, ) -> Result<Arc<ReadonlyRepo>, RepoLoaderError>
pub fn load_at( &self, op: &Operation, ) -> Result<Arc<ReadonlyRepo>, RepoLoaderError>
pub fn create_from( &self, operation: Operation, view: View, index: Box<dyn ReadonlyIndex>, ) -> Arc<ReadonlyRepo>
sourcepub fn merge_operations(
&self,
settings: &UserSettings,
operations: Vec<Operation>,
tx_description: Option<&str>,
) -> Result<Operation, RepoLoaderError>
pub fn merge_operations( &self, settings: &UserSettings, operations: Vec<Operation>, tx_description: Option<&str>, ) -> Result<Operation, RepoLoaderError>
Merges the given operations
into a single operation.
Assumes that there is at least one operation.
Trait Implementations§
source§impl Clone for RepoLoader
impl Clone for RepoLoader
source§fn clone(&self) -> RepoLoader
fn clone(&self) -> RepoLoader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RepoLoader
impl !RefUnwindSafe for RepoLoader
impl Send for RepoLoader
impl Sync for RepoLoader
impl Unpin for RepoLoader
impl !UnwindSafe for RepoLoader
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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