pub struct DryRun { /* private fields */ }Expand description
Reports what the daemon would do, and mounts nothing.
Implementations§
Source§impl DryRun
impl DryRun
Sourcepub fn with_output(mount_root: PathBuf, out: Box<dyn Write + Send>) -> Self
pub fn with_output(mount_root: PathBuf, out: Box<dyn Write + Send>) -> Self
A reporter that prints wherever you tell it. Tests capture the output.
Sourcepub fn open_keys(&self) -> Vec<String>
pub fn open_keys(&self) -> Vec<String>
Keys that arrived and haven’t left, sorted. Used by tests.
Sourcepub fn run(self, commands: Receiver<DryRunCommand>)
pub fn run(self, commands: Receiver<DryRunCommand>)
Report events until DryRunCommand::Stop arrives or every sender is
dropped, then print the summary.
Blocks the calling thread, like crate::daemon::supervisor::Supervisor::run,
and for the same reason: the daemon keeps its runtime for the watch.
Header: what this mode does and what to do with it.
Sourcepub fn arrived(&mut self, facts: &DeviceFacts)
pub fn arrived(&mut self, facts: &DeviceFacts)
Report an arrival.
Sourcepub fn left(&mut self, facts: &DeviceFacts) -> DepartureVerdict
pub fn left(&mut self, facts: &DeviceFacts) -> DepartureVerdict
Report a departure, and say whether it matched. Returns the verdict so tests can assert on it without parsing the text.
Auto Trait Implementations§
impl !RefUnwindSafe for DryRun
impl !Sync for DryRun
impl !UnwindSafe for DryRun
impl Freeze for DryRun
impl Send for DryRun
impl Unpin for DryRun
impl UnsafeUnpin for DryRun
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