pub struct WorktreeOptions {
pub limits: WorktreeLimits,
pub parallelism: usize,
}Expand description
Runtime policy for opening and preparing a worktree transaction.
Fields§
§limits: WorktreeLimits§parallelism: usizeZero selects bounded automatic parallelism.
Implementations§
Source§impl WorktreeOptions
impl WorktreeOptions
pub const fn with_limits(self, limits: WorktreeLimits) -> Self
Sourcepub const fn with_parallelism(self, parallelism: usize) -> Self
pub const fn with_parallelism(self, parallelism: usize) -> Self
Sets preparation workers. Zero restores bounded automatic selection.
pub fn validate(&self) -> Result<(), WorktreeError>
Sourcepub fn worker_count(&self, file_count: usize) -> usize
pub fn worker_count(&self, file_count: usize) -> usize
Resolves the bounded worker count for a known number of files.
Trait Implementations§
Source§impl Clone for WorktreeOptions
impl Clone for WorktreeOptions
Source§fn clone(&self) -> WorktreeOptions
fn clone(&self) -> WorktreeOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorktreeOptions
Source§impl Debug for WorktreeOptions
impl Debug for WorktreeOptions
Source§impl Default for WorktreeOptions
impl Default for WorktreeOptions
Source§fn default() -> WorktreeOptions
fn default() -> WorktreeOptions
Returns the “default value” for a type. Read more
impl Eq for WorktreeOptions
Source§impl PartialEq for WorktreeOptions
impl PartialEq for WorktreeOptions
impl StructuralPartialEq for WorktreeOptions
Auto Trait Implementations§
impl Freeze for WorktreeOptions
impl RefUnwindSafe for WorktreeOptions
impl Send for WorktreeOptions
impl Sync for WorktreeOptions
impl Unpin for WorktreeOptions
impl UnsafeUnpin for WorktreeOptions
impl UnwindSafe for WorktreeOptions
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