pub trait PartitionRead<L: Level> {
// Required methods
fn cardinality(&self) -> usize;
fn is_empty(&self) -> bool;
fn contains(&self, value: L::Value) -> bool;
fn rank(&self, value: L::Value) -> usize;
fn select(&self, idx: usize) -> Option<L::Value>;
fn last(&self) -> Option<L::Value>;
fn iter(&self) -> impl Iterator<Item = L::Value>;
// Provided method
fn range<R>(&self, range: R) -> impl Iterator<Item = L::Value>
where R: RangeBounds<L::Value> + Clone { ... }
}
Required Methods§
Sourcefn cardinality(&self) -> usize
fn cardinality(&self) -> usize
the total number of values accessible via this partition.
Sourcefn contains(&self, value: L::Value) -> bool
fn contains(&self, value: L::Value) -> bool
returns true if this partition contains the given value
Provided Methods§
Sourcefn range<R>(&self, range: R) -> impl Iterator<Item = L::Value>where
R: RangeBounds<L::Value> + Clone,
fn range<R>(&self, range: R) -> impl Iterator<Item = L::Value>where
R: RangeBounds<L::Value> + Clone,
returns an iterator over all values in this partition restricted by the provided range.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.