Skip to main content

SegmentEnumerator

Trait SegmentEnumerator 

Source
pub trait SegmentEnumerator: Send + Sync {
    // Required method
    fn list_segments(&self) -> OperationResult<HashMap<Uuid, PathBuf>>;
}
Expand description

Enumerates the segments that make up the shard, keyed by their UUID.

The follower delegates discovery to an enumerator, chosen by whoever knows the backend:

Called on every refresh, so it must reflect the current set. The returned paths are segment directory paths interpreted relative to the backend root (e.g. segments/<uuid>), matching what ReadOnlySegment::open expects.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§