Struct email::sync::SyncBuilder
source · pub struct SyncBuilder<L: BackendContextBuilder + SyncHash, R: BackendContextBuilder + SyncHash> {
left_builder: BackendBuilder<L>,
left_hash: String,
right_builder: BackendBuilder<R>,
right_hash: String,
cache_dir: Option<PathBuf>,
pool_size: Option<usize>,
handler: Option<Arc<SyncEventHandler>>,
dry_run: Option<bool>,
folder_filter: Option<FolderSyncStrategy>,
}
Expand description
The synchronization builder.
Fields§
§left_builder: BackendBuilder<L>
§left_hash: String
§right_builder: BackendBuilder<R>
§right_hash: String
§cache_dir: Option<PathBuf>
§pool_size: Option<usize>
§handler: Option<Arc<SyncEventHandler>>
§dry_run: Option<bool>
§folder_filter: Option<FolderSyncStrategy>
Implementations§
source§impl<L, R> SyncBuilder<L, R>
impl<L, R> SyncBuilder<L, R>
sourcepub fn new(
left_builder: BackendBuilder<L>,
right_builder: BackendBuilder<R>
) -> Self
pub fn new( left_builder: BackendBuilder<L>, right_builder: BackendBuilder<R> ) -> Self
Create a new synchronization builder using the two given backend builders.
pub fn set_some_cache_dir(&mut self, dir: Option<impl Into<PathBuf>>)
pub fn set_cache_dir(&mut self, dir: impl Into<PathBuf>)
pub fn with_some_cache_dir(self, dir: Option<impl Into<PathBuf>>) -> Self
pub fn with_cache_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn set_some_pool_size(&mut self, size: Option<usize>)
pub fn set_pool_size(&mut self, size: usize)
pub fn with_some_pool_size(self, size: Option<usize>) -> Self
pub fn with_pool_size(self, size: usize) -> Self
pub fn set_some_handler<F: Future<Output = Result<()>> + Send + 'static>( &mut self, handler: Option<impl Fn(SyncEvent) -> F + Send + Sync + 'static> )
pub fn set_handler<F: Future<Output = Result<()>> + Send + 'static>( &mut self, handler: impl Fn(SyncEvent) -> F + Send + Sync + 'static )
pub fn with_some_handler<F: Future<Output = Result<()>> + Send + 'static>( self, handler: Option<impl Fn(SyncEvent) -> F + Send + Sync + 'static> ) -> Self
pub fn with_handler<F: Future<Output = Result<()>> + Send + 'static>( self, handler: impl Fn(SyncEvent) -> F + Send + Sync + 'static ) -> Self
pub fn set_some_dry_run(&mut self, dry_run: Option<bool>)
pub fn set_dry_run(&mut self, dry_run: bool)
pub fn with_some_dry_run(self, dry_run: Option<bool>) -> Self
pub fn with_dry_run(self, dry_run: bool) -> Self
pub fn get_dry_run(&self) -> bool
pub fn set_some_folders_filter( &mut self, filter: Option<impl Into<FolderSyncStrategy>> )
pub fn set_folders_filter(&mut self, folders: impl Into<FolderSyncStrategy>)
pub fn with_some_folders_filter( self, folders: Option<impl Into<FolderSyncStrategy>> ) -> Self
pub fn with_folders_filter(self, folders: impl Into<FolderSyncStrategy>) -> Self
pub fn find_default_cache_dir(&self) -> Option<PathBuf>
pub fn find_cache_dir(&self) -> Option<PathBuf>
pub fn get_cache_dir(&self) -> Result<PathBuf>
pub fn get_left_cache_builder( &self ) -> Result<BackendBuilder<MaildirContextBuilder>>
pub fn get_right_cache_builder( &self ) -> Result<BackendBuilder<MaildirContextBuilder>>
pub async fn sync(self) -> Result<SyncReport>
Trait Implementations§
source§impl<L: Clone + BackendContextBuilder + SyncHash, R: Clone + BackendContextBuilder + SyncHash> Clone for SyncBuilder<L, R>
impl<L: Clone + BackendContextBuilder + SyncHash, R: Clone + BackendContextBuilder + SyncHash> Clone for SyncBuilder<L, R>
source§fn clone(&self) -> SyncBuilder<L, R>
fn clone(&self) -> SyncBuilder<L, R>
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<L, R> Freeze for SyncBuilder<L, R>
impl<L, R> !RefUnwindSafe for SyncBuilder<L, R>
impl<L, R> Send for SyncBuilder<L, R>
impl<L, R> Sync for SyncBuilder<L, R>
impl<L, R> Unpin for SyncBuilder<L, R>
impl<L, R> !UnwindSafe for SyncBuilder<L, R>
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.