pub struct DiffParams { /* private fields */ }
Expand description
Parameters used when creating diffs
Implementations§
Source§impl DiffParams
impl DiffParams
Sourcepub fn new(
sort_partitions: usize,
scan_chunk_size: Option<usize>,
) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
pub fn new( sort_partitions: usize, scan_chunk_size: Option<usize>, ) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
Construct new diff params and check validity
§Parameters
sort_partitions
: Number of partitions to use for suffix sorting. Increase this number increases parallelism but produces slightly worse patches. Needs to be at least 1.scan_chunk_size
: Size of chunks to use for scanning. WhenNone
, treat the input as a single chunk. Smaller chunks increase parallelism but produce slightly worse patches. WhenSome
, it needs to be at least 1.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiffParams
impl RefUnwindSafe for DiffParams
impl Send for DiffParams
impl Sync for DiffParams
impl Unpin for DiffParams
impl UnwindSafe for DiffParams
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> 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