pub struct Plan<I: Item> {
pub collection_plans: Vec<CollectionPlan<I>>,
pub stale_collections: Vec<MappingUid>,
/* private fields */
}Expand description
Actions that would synchronise a pair of storages.
Use Plan::new to create new instances.
Use Plan::collection_plans) to inspect the plan and render it into a human-friendly
representation, into a CSV, or into any other format that is necessary.
Fields§
§collection_plans: Vec<CollectionPlan<I>>§stale_collections: Vec<MappingUid>Implementations§
Source§impl<I: Item> Plan<I>
impl<I: Item> Plan<I>
Sourcepub async fn new(
pair: &StoragePair<I>,
status: Option<&StatusDatabase>,
) -> Result<Plan<I>, PlanError>
pub async fn new( pair: &StoragePair<I>, status: Option<&StatusDatabase>, ) -> Result<Plan<I>, PlanError>
Create a new plan for a given storage pair.
Analyses the provided StoragePair, fetches necessary metadata, and prepares a plan of
actions required to synchronise both storages.
This function only performs read operations. The status database should be opened in read-only mode.
§Errors
See: PlanError.
pub fn storage_a(&self) -> &dyn Storage<I>
pub fn storage_b(&self) -> &dyn Storage<I>
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for Plan<I>
impl<I> !RefUnwindSafe for Plan<I>
impl<I> Send for Plan<I>
impl<I> Sync for Plan<I>
impl<I> Unpin for Plan<I>
impl<I> !UnwindSafe for Plan<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.