pub struct StoragePair<I: Item> { /* private fields */ }
Expand description
A pair of storage that are to be synchronised.
This type merely wraps around the declaration of what shall be synchronised. It can be
constructed offline and is the entry point to create a Plan
and then execute it.
New pairs can be created via StoragePair::new
.
Implementations§
source§impl<I: Item> StoragePair<I>
impl<I: Item> StoragePair<I>
sourcepub fn new(
storage_a: Arc<dyn Storage<I>>,
storage_b: Arc<dyn Storage<I>>,
) -> StoragePair<I>
pub fn new( storage_a: Arc<dyn Storage<I>>, storage_b: Arc<dyn Storage<I>>, ) -> StoragePair<I>
Create a new instance.
By default, no collections are to be synchronised. See other associated functions for details con configuring additional collections.
sourcepub fn with_mapping(self, mapping: DeclaredMapping) -> Self
pub fn with_mapping(self, mapping: DeclaredMapping) -> Self
Include the specified mapping when synchronising.
sourcepub fn with_all_from_a(self) -> Self
pub fn with_all_from_a(self) -> Self
Include all collections from storage A when synchronising.
By default, only explicitly included collections are synchronised.
sourcepub fn with_all_from_b(self) -> Self
pub fn with_all_from_b(self) -> Self
Include all collections from storage B when synchronising.
By default, only explicitly included collections are synchronised.
Auto Trait Implementations§
impl<I> Freeze for StoragePair<I>
impl<I> !RefUnwindSafe for StoragePair<I>
impl<I> Send for StoragePair<I>
impl<I> Sync for StoragePair<I>
impl<I> Unpin for StoragePair<I>
impl<I> !UnwindSafe for StoragePair<I>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.