pub struct DiscoveryService { /* private fields */ }Expand description
Runs a set of scanners and reconciles their findings into a registry.
Implementations§
Source§impl DiscoveryService
impl DiscoveryService
Sourcepub fn new(scanners: Vec<Box<dyn StoreScanner>>) -> Self
pub fn new(scanners: Vec<Box<dyn StoreScanner>>) -> Self
A service over scanners, using the default duplicate threshold.
Sourcepub fn with_threshold(
scanners: Vec<Box<dyn StoreScanner>>,
duplicate_threshold: i64,
) -> Self
pub fn with_threshold( scanners: Vec<Box<dyn StoreScanner>>, duplicate_threshold: i64, ) -> Self
A service with an explicit duplicate-detection size threshold.
Sourcepub fn discover(
&self,
registry: &mut Registry,
) -> Result<DiscoverySummary, RegistryError>
pub fn discover( &self, registry: &mut Registry, ) -> Result<DiscoverySummary, RegistryError>
Scan every store and reconcile the results into registry, returning a
summary. Records are updated/inserted; a scanned model no longer on disk
is marked missing; a model whose files moved carries its saved config to
the new record.
Auto Trait Implementations§
impl !RefUnwindSafe for DiscoveryService
impl !Sync for DiscoveryService
impl !UnwindSafe for DiscoveryService
impl Freeze for DiscoveryService
impl Send for DiscoveryService
impl Unpin for DiscoveryService
impl UnsafeUnpin for DiscoveryService
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