#[non_exhaustive]pub struct WatchOptions {
pub subtree: bool,
pub retry: RetryMode,
pub report_liveness: bool,
pub on_volume_change: VolumeChangePolicy,
}Expand description
What a client states when it registers a subscription.
Non-exhaustive so that a future additive option is not a breaking change:
build one with WatchOptions::new and the setters rather than a struct
literal.
There is deliberately no change-type filter here, and none is planned.
This crate’s contract is completeness: a change notification is positive
evidence that a file was not finished, never evidence that it was, so a
client can only decide “is it done yet?” by watching the change traffic go
quiet. A filter would discard exactly that evidence, and under the crate’s
per-directory coalescing it could not even be applied faithfully – the five
content-ish change classes all arrive as one indistinguishable
ChangeKind::Modified action. See D-77 in the
crate’s design notes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subtree: boolWhether changes below the target are reported as well.
retry: RetryModeHow this subscription should be recovered from faults.
report_liveness: boolWhether Suspended/Resumed/Established are reported (D-13). Off by
default: a subscription that only wants change data need not think about
the fault machine’s liveness brackets at all.
on_volume_change: VolumeChangePolicyWhether to be asked before continuing when a reopen lands on a different volume than this subscription started on (D-78).
Implementations§
Source§impl WatchOptions
impl WatchOptions
Sourcepub fn report_liveness(self, report_liveness: bool) -> Self
pub fn report_liveness(self, report_liveness: bool) -> Self
Opt in to Suspended/Resumed/Established (D-13).
Sourcepub fn on_volume_change(self, policy: VolumeChangePolicy) -> Self
pub fn on_volume_change(self, policy: VolumeChangePolicy) -> Self
Choose whether a volume change on reopen needs this subscription’s confirmation (D-78).