pub struct BranchEngineBuilder { /* private fields */ }Expand description
Ergonomic builder for constructing a BranchEngine.
Implementations§
Source§impl BranchEngineBuilder
impl BranchEngineBuilder
Sourcepub fn workspace_id(self, workspace_id: Uuid) -> Self
pub fn workspace_id(self, workspace_id: Uuid) -> Self
Sets the workspace identifier.
Sourcepub fn branches_dir<P: Into<PathBuf>>(self, branches_dir: P) -> Self
pub fn branches_dir<P: Into<PathBuf>>(self, branches_dir: P) -> Self
Sets the branches directory path.
Sourcepub fn trunk_source_db<P: Into<PathBuf>>(self, trunk_source_db: P) -> Self
pub fn trunk_source_db<P: Into<PathBuf>>(self, trunk_source_db: P) -> Self
Sets the trunk source SQLite path.
Sourcepub fn max_branches(self, max_branches: usize) -> Self
pub fn max_branches(self, max_branches: usize) -> Self
Sets max branch count per workspace.
Sourcepub fn gc_interval_secs(self, gc_interval_secs: u64) -> Self
pub fn gc_interval_secs(self, gc_interval_secs: u64) -> Self
Sets GC interval in seconds.
Sourcepub async fn build(self) -> Result<BranchEngine, BranchConfigError>
pub async fn build(self) -> Result<BranchEngine, BranchConfigError>
Builds a fully-initialized BranchEngine.
Trait Implementations§
Source§impl Clone for BranchEngineBuilder
impl Clone for BranchEngineBuilder
Source§fn clone(&self) -> BranchEngineBuilder
fn clone(&self) -> BranchEngineBuilder
Returns a duplicate 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 moreSource§impl Debug for BranchEngineBuilder
impl Debug for BranchEngineBuilder
Source§impl Default for BranchEngineBuilder
impl Default for BranchEngineBuilder
Source§fn default() -> BranchEngineBuilder
fn default() -> BranchEngineBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BranchEngineBuilder
impl RefUnwindSafe for BranchEngineBuilder
impl Send for BranchEngineBuilder
impl Sync for BranchEngineBuilder
impl Unpin for BranchEngineBuilder
impl UnsafeUnpin for BranchEngineBuilder
impl UnwindSafe for BranchEngineBuilder
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§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