pub trait DirectoryVersions: Send + Sync {
// Required methods
fn highest(&self) -> Result<u64, PeeringError>;
fn record(&self, version: u64) -> Result<(), PeeringError>;
}Expand description
The persisted anti-rollback floor: the highest device-directory version this device has
verified. Implementations must be monotonic — record never lowers it — and
durable across restarts, or a reboot readmits a stale directory.
Required Methods§
Sourcefn highest(&self) -> Result<u64, PeeringError>
fn highest(&self) -> Result<u64, PeeringError>
The highest version recorded so far (0 when none).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".