pub struct SyncBuilder { /* private fields */ }Expand description
Builder for creating sync engines with custom configuration.
§Example
use copia::SyncBuilder;
let sync = SyncBuilder::new()
.block_size(4096)
.buffer_size(128 * 1024)
.build();Implementations§
Source§impl SyncBuilder
impl SyncBuilder
Sourcepub fn block_size(self, size: usize) -> Self
pub fn block_size(self, size: usize) -> Self
Set the block size for signature generation.
Must be a power of 2 between 512 and 65536.
§Panics
Panics if block size is invalid.
Sourcepub fn strong_hash_len(self, len: usize) -> Self
pub fn strong_hash_len(self, len: usize) -> Self
Set the strong hash length for comparisons.
Must be between 4 and 32 bytes.
§Panics
Panics if length is invalid.
Sourcepub fn buffer_size(self, size: usize) -> Self
pub fn buffer_size(self, size: usize) -> Self
Set the I/O buffer size.
Sourcepub fn verify_checksum(self, verify: bool) -> Self
pub fn verify_checksum(self, verify: bool) -> Self
Enable or disable checksum verification after patch.
Trait Implementations§
Source§impl Clone for SyncBuilder
impl Clone for SyncBuilder
Source§fn clone(&self) -> SyncBuilder
fn clone(&self) -> SyncBuilder
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 SyncBuilder
impl Debug for SyncBuilder
Auto Trait Implementations§
impl Freeze for SyncBuilder
impl RefUnwindSafe for SyncBuilder
impl Send for SyncBuilder
impl Sync for SyncBuilder
impl Unpin for SyncBuilder
impl UnwindSafe for SyncBuilder
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> 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