Expand description
This module contains a list of primitives that implement a Object
trait.
They help to locate a necessary segment on a Table
.
§Example
use tabled::{
settings::{
object::{Columns, Object, Rows},
Alignment,
},
assert::assert_table,
Table,
};
let data = [
[1, 2, 3, 4, 5],
[10, 20, 30, 40, 50],
[100, 200, 300, 400, 500],
];
let mut table = Table::new(data);
table.modify(Rows::first().not(Columns::first()), Alignment::right());
assert_table!(
table,
"+-----+-----+-----+-----+-----+"
"| 0 | 1 | 2 | 3 | 4 |"
"+-----+-----+-----+-----+-----+"
"| 1 | 2 | 3 | 4 | 5 |"
"+-----+-----+-----+-----+-----+"
"| 10 | 20 | 30 | 40 | 50 |"
"+-----+-----+-----+-----+-----+"
"| 100 | 200 | 300 | 400 | 500 |"
"+-----+-----+-----+-----+-----+"
);
Structs§
- Cell
- Cell denotes a particular cell on a
Table
. - Column
- Column represents a single column on a grid.
- Columns
- Column denotes a set of cells on given columns on a
Table
. - Columns
Iter - An
Iterator
which goes goes over columns of aTable
. - Diff
Combination - Difference struct used for chaining
Object
’s. - Diff
Iter - An
Iterator
which goes over only cells which are present in firstObject::Iter
but not second. - Entity
Once - An
Iterator
which returns an entity once. - Filter
Object - Filter object for any
Object
. - Filter
Object Iter - Filter object iterator for any
Object
. - First
Column FirstColumn
represents the first column on a grid.- First
Row - This structure represents the first row of a
Table
. It’s often contains headers data. - Frame
- Frame includes cells which are on the edges of each side.
Therefore it’s
Object
implementation returns a subset of cells which are present in frame. - Frame
Iter - An
Iterator
which goes goes over all cell on a frame of aTable
. - Intersect
Iter - An
Iterator
which goes goes over cells which are present in bothObject::Iter
ators. - Intersection
Combination - Intersection struct used for chaining
Object
’s. - Inversion
Combination - Inversion struct used for chaining
Object
’s. - Inversion
Iter - An
Iterator
which goes goes over cells which are not present anObject::Iter
ator. - Last
Column LastColumn
represents the last column on a grid.- Last
Column Offset LastColumnOffset
represents a single column on a grid indexed via offset from the last column.- LastRow
- This structure represents the last row of a
Table
. - Last
RowOffset - A row which is located by an offset from the last row.
- Row
- A row which is located by an offset from the first row.
- Rows
- Row denotes a set of cells on given rows on a
Table
. - Rows
Iter - An
Iterator
which goes goes over all rows of aTable
. - Sector
Iter - An
Iterator
which goes goes over all cell in a sector in aTable
. - Segment
- This structure represents a sub table of
Table
. - Segment
All - This is a segment which contains all cells on the table.
- Skip
Object - Skip object for any
Object
. - Skip
Object Iter - Skip object iterator for any
Object
. - Step
ByObject - Step object for any
Object
. - Step
ByObject Iter - Step object iterator for any
Object
. - Union
Combination - Combination struct used for chaining
Object
’s. - Union
Iter - An
Iterator
which goes over a combinationObject::Iter
.
Traits§
- Object
- Object helps to locate a necessary part of a
Table
. - Object
Iterator - A utility trait helps to modify an
Object
, by various functions.