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>
where L: BackendContextBuilder + SyncHash + 'static, R: BackendContextBuilder + SyncHash + 'static,

source

pub fn new( left_builder: BackendBuilder<L>, right_builder: BackendBuilder<R> ) -> Self

Create a new synchronization builder using the two given backend builders.

source

pub fn set_some_cache_dir(&mut self, dir: Option<impl Into<PathBuf>>)

source

pub fn set_cache_dir(&mut self, dir: impl Into<PathBuf>)

source

pub fn with_some_cache_dir(self, dir: Option<impl Into<PathBuf>>) -> Self

source

pub fn with_cache_dir(self, dir: impl Into<PathBuf>) -> Self

source

pub fn set_some_pool_size(&mut self, size: Option<usize>)

source

pub fn set_pool_size(&mut self, size: usize)

source

pub fn with_some_pool_size(self, size: Option<usize>) -> Self

source

pub fn with_pool_size(self, size: usize) -> Self

source

pub fn set_some_handler<F: Future<Output = Result<()>> + Send + 'static>( &mut self, handler: Option<impl Fn(SyncEvent) -> F + Send + Sync + 'static> )

source

pub fn set_handler<F: Future<Output = Result<()>> + Send + 'static>( &mut self, handler: impl Fn(SyncEvent) -> F + Send + Sync + 'static )

source

pub fn with_some_handler<F: Future<Output = Result<()>> + Send + 'static>( self, handler: Option<impl Fn(SyncEvent) -> F + Send + Sync + 'static> ) -> Self

source

pub fn with_handler<F: Future<Output = Result<()>> + Send + 'static>( self, handler: impl Fn(SyncEvent) -> F + Send + Sync + 'static ) -> Self

source

pub fn set_some_dry_run(&mut self, dry_run: Option<bool>)

source

pub fn set_dry_run(&mut self, dry_run: bool)

source

pub fn with_some_dry_run(self, dry_run: Option<bool>) -> Self

source

pub fn with_dry_run(self, dry_run: bool) -> Self

source

pub fn get_dry_run(&self) -> bool

source

pub fn set_some_folders_filter( &mut self, filter: Option<impl Into<FolderSyncStrategy>> )

source

pub fn set_folders_filter(&mut self, folders: impl Into<FolderSyncStrategy>)

source

pub fn with_some_folders_filter( self, folders: Option<impl Into<FolderSyncStrategy>> ) -> Self

source

pub fn with_folders_filter(self, folders: impl Into<FolderSyncStrategy>) -> Self

source

pub fn find_default_cache_dir(&self) -> Option<PathBuf>

source

pub fn find_cache_dir(&self) -> Option<PathBuf>

source

pub fn get_cache_dir(&self) -> Result<PathBuf>

source

pub fn get_left_cache_builder( &self ) -> Result<BackendBuilder<MaildirContextBuilder>>

source

pub fn get_right_cache_builder( &self ) -> Result<BackendBuilder<MaildirContextBuilder>>

source

pub async fn sync(self) -> Result<SyncReport>

Trait Implementations§

source§

impl<L: Clone + BackendContextBuilder + SyncHash, R: Clone + BackendContextBuilder + SyncHash> Clone for SyncBuilder<L, R>

source§

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)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<L, R> Freeze for SyncBuilder<L, R>
where R: Sync + Send + Clone + Freeze, L: Sync + Send + Clone + Freeze,

§

impl<L, R> !RefUnwindSafe for SyncBuilder<L, R>

§

impl<L, R> Send for SyncBuilder<L, R>
where R: Sync + Send + Clone, L: Sync + Send + Clone,

§

impl<L, R> Sync for SyncBuilder<L, R>
where R: Sync + Send + Clone, L: Sync + Send + Clone,

§

impl<L, R> Unpin for SyncBuilder<L, R>
where R: Sync + Send + Clone + Unpin, L: Sync + Send + Clone + Unpin,

§

impl<L, R> !UnwindSafe for SyncBuilder<L, R>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

§

type Err = NoError

The error type produced by a failed conversion.
source§

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 Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

§

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>

Convert the subject into an approximately equivalent representation.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, Dst> ConvAsUtil<Dst> for T

source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
source§

impl<T> ConvUtil for T

source§

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>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
source§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
source§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
source§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a MaybeRef.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<Src> TryFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<Src> ValueFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> MaybeSync for T

source§

impl<'p, T> OrderedSeq<'p, T> for T
where T: Clone,