pub trait RowSetOps: Clone + Sized {
type Row;
// Required methods
fn is_empty(&self) -> bool;
fn len(&self) -> Option<u64>;
fn remove(&mut self, row: Self::Row) -> bool;
fn contains(&self, row: Self::Row) -> bool;
fn union_all(other: &[&Self]) -> Self;
fn from_sorted_iter<I>(iter: I) -> Result<Self>
where I: IntoIterator<Item = Self::Row>;
}Expand description
Common operations over a set of rows (either row ids or row addresses).
The concrete representation can be address-based (RowAddrTreeMap) or
id-based (for example a future RowIdSet), but the semantics are the same:
a set of unique rows.
Required Associated Types§
Required Methods§
Sourcefn len(&self) -> Option<u64>
fn len(&self) -> Option<u64>
Returns the number of rows in the set, if it is known.
Implementations that cannot always compute an exact size (for example
because of “full fragment” markers) should return None.
Sourcefn from_sorted_iter<I>(iter: I) -> Result<Self>where
I: IntoIterator<Item = Self::Row>,
fn from_sorted_iter<I>(iter: I) -> Result<Self>where
I: IntoIterator<Item = Self::Row>,
Builds a row set from an iterator of rows.
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.