Trait Object

Source
pub trait Object<R> {
    type Iter: Iterator<Item = Entity>;

    // Required method
    fn cells(&self, records: &R) -> Self::Iter;

    // Provided methods
    fn and<O>(self, rhs: O) -> UnionCombination<Self, O, R>
       where Self: Sized { ... }
    fn not<O>(self, rhs: O) -> DiffCombination<Self, O, R>
       where Self: Sized { ... }
    fn intersect<O>(self, rhs: O) -> IntersectionCombination<Self, O, R>
       where Self: Sized { ... }
    fn inverse(self) -> InversionCombination<Self, R>
       where Self: Sized { ... }
}
Expand description

Object helps to locate a necessary part of a Table.

Required Associated Types§

Source

type Iter: Iterator<Item = Entity>

An Iterator which returns a list of cells.

Required Methods§

Source

fn cells(&self, records: &R) -> Self::Iter

Cells returns a set of coordinates of cells.

Provided Methods§

Source

fn and<O>(self, rhs: O) -> UnionCombination<Self, O, R>
where Self: Sized,

Combines cells. It doesn’t repeat cells.

Source

fn not<O>(self, rhs: O) -> DiffCombination<Self, O, R>
where Self: Sized,

Excludes rhs cells from this cells.

Source

fn intersect<O>(self, rhs: O) -> IntersectionCombination<Self, O, R>
where Self: Sized,

Returns cells which are present in both Objects only.

Source

fn inverse(self) -> InversionCombination<Self, R>
where Self: Sized,

Returns cells which are not present in target Object.

Implementations on Foreign Types§

Source§

impl<I> Object<I> for (usize, usize)

Source§

type Iter = EntityOnce

Source§

fn cells(&self, _: &I) -> Self::Iter

Implementors§

Source§

impl<F, R> Object<R> for ByCondition<F>

Source§

impl<I> Object<I> for Position

Source§

impl<I> Object<I> for Cell

Source§

impl<I> Object<I> for Column

Source§

impl<I> Object<I> for FirstColumn
where I: Records + ExactRecords,

Source§

impl<I> Object<I> for FirstRow
where I: Records + ExactRecords,

Source§

impl<I> Object<I> for Frame
where I: Records + ExactRecords,

Source§

impl<I> Object<I> for LastColumn
where I: Records + ExactRecords,

Source§

impl<I> Object<I> for LastColumnOffset
where I: Records,

Source§

impl<I> Object<I> for LastRow
where I: Records + ExactRecords,

Source§

impl<I> Object<I> for LastRowOffset
where I: Records + ExactRecords,

Source§

impl<I> Object<I> for Row

Source§

impl<I> Object<I> for SegmentAll

Source§

impl<I, C, R> Object<I> for Segment<C, R>

Source§

impl<I, L, R> Object<I> for DiffCombination<L, R, I>
where L: Object<I>, R: Object<I>, I: Records + ExactRecords,

Source§

type Iter = DiffIter<<L as Object<I>>::Iter>

Source§

impl<I, L, R> Object<I> for IntersectionCombination<L, R, I>
where L: Object<I>, R: Object<I>, I: Records + ExactRecords,

Source§

impl<I, L, R> Object<I> for UnionCombination<L, R, I>
where L: Object<I>, R: Object<I>, I: Records + ExactRecords,

Source§

type Iter = UnionIter<<L as Object<I>>::Iter, <R as Object<I>>::Iter>

Source§

impl<I, O> Object<I> for InversionCombination<O, I>
where O: Object<I>, I: Records + ExactRecords,

Source§

impl<I, R> Object<I> for Columns<R>
where R: RangeBounds<usize>, I: Records,

Source§

impl<I, R> Object<I> for Rows<R>

Source§

impl<O, F, R> Object<R> for ByValue<O, F>
where O: Object<R>, F: Fn(&str, &str) -> bool, R: Records + PeekableRecords + ExactRecords,

Source§

impl<O, R> Object<R> for SkipObject<O, R>
where O: Object<R>,

Source§

impl<O, R> Object<R> for StepByObject<O, R>
where O: Object<R>,

Source§

impl<O, R, F> Object<R> for FilterObject<O, F, R>
where O: Object<R>, F: Fn(Entity) -> bool + Clone,

Source§

impl<S, R> Object<R> for ByColumnName<S>

Source§

impl<S, R> Object<R> for ByContent<S>