pub(crate) struct NamedPair<I: Item> {
pub(crate) name: String,
pub(crate) inner: StoragePair<I>,
pub(crate) status_path: Utf8PathBuf,
pub(crate) conflict_resolution: Option<RawCommand>,
pub(crate) locks: (Arc<Mutex<()>>, Arc<Mutex<()>>),
pub(crate) names: (String, String),
}
Expand description
Pair with a name, as defined in the configuration file.
Fields§
§name: String
§inner: StoragePair<I>
§status_path: Utf8PathBuf
§conflict_resolution: Option<RawCommand>
§locks: (Arc<Mutex<()>>, Arc<Mutex<()>>)
Discretionary locks taken before using a storage. These MUST be sorted based on storage name to prevent possible deadlocks.
names: (String, String)
Implementations§
source§impl<I: Item> NamedPair<I>
impl<I: Item> NamedPair<I>
sourcepub(crate) async fn daemon(self, interval: Duration) -> StatusError
pub(crate) async fn daemon(self, interval: Duration) -> StatusError
Sync this pair indefinitely
Returns an error if an only if a fatal synchronisation error occurred.
pub(crate) async fn sync_once(&self, dry_run: bool) -> Result<()>
pub(crate) async fn create_plan(&self) -> Result<Plan<I>>
pub(crate) async fn discover(&self) -> Result<()>
pub(crate) fn print_plan(&self, plan: &Plan<I>)
pub(crate) async fn resolve_conflicts(self, stdio: Arc<StdIo>) -> Result<()>
Auto Trait Implementations§
impl<I> Freeze for NamedPair<I>
impl<I> !RefUnwindSafe for NamedPair<I>
impl<I> Send for NamedPair<I>
impl<I> Sync for NamedPair<I>
impl<I> Unpin for NamedPair<I>
impl<I> !UnwindSafe for NamedPair<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.