pub trait MountRefreshSource: Send + Sync {
// Required method
fn sample(&self) -> Result<BackendRefreshSample, String>;
// Provided method
fn has_watch_contract(&self) -> bool { ... }
}Expand description
Explicit sampling contract for one mounted backend.
Backends with a native watch contract return true from
Self::has_watch_contract and are skipped by ExprTreeCalc::refresh.
sample is called only by that explicit refresh operation.
Required Methods§
Sourcefn sample(&self) -> Result<BackendRefreshSample, String>
fn sample(&self) -> Result<BackendRefreshSample, String>
Samples the backend’s epoch, relevant listings, and entry stamps.
Provided Methods§
Sourcefn has_watch_contract(&self) -> bool
fn has_watch_contract(&self) -> bool
Whether this backend already reports mutations through a watch contract.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".