pub struct Matrix {
pub rows: Vec<Row>,
pub delims: Option<(Delim, Delim)>,
pub kind: MatrixKind,
pub align: Side,
pub columns: Vec<Side>,
pub rules: bool,
}Expand description
Table of cells with optional delimiters.
Fields§
§rows: Vec<Row>§delims: Option<(Delim, Delim)>§kind: MatrixKind§align: SideAlignment applied to every column; per-column rules come from Matrix::columns.
columns: Vec<Side>Optional per-column alignment overriding Matrix::align.
rules: boolDraws the horizontal and vertical cell rules of an array.
Implementations§
Source§impl Matrix
impl Matrix
Sourcepub fn empty(rows: usize, cols: usize) -> Self
pub fn empty(rows: usize, cols: usize) -> Self
A matrix of rows rows and cols columns, each cell an empty slot.
Sourcepub fn cell_at(&self, index: usize) -> Option<&Node>
pub fn cell_at(&self, index: usize) -> Option<&Node>
Cell addressed by a flat slot index, row-major.
Sourcepub fn cell_at_mut(&mut self, index: usize) -> Option<&mut Node>
pub fn cell_at_mut(&mut self, index: usize) -> Option<&mut Node>
Mutable cell addressed by a flat slot index, row-major.
Trait Implementations§
impl Eq for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl Forget for Matrix
impl Freeze for Matrix
impl Move for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnsafeUnpin for Matrixwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Vec<Node>>: UnsafeUnpin,
PhantomData<Side>: UnsafeUnpin,
impl UnwindSafe for Matrixwhere
RawVecInner: UnwindSafe,
BoxRaw<TextRun>: UnwindSafe,
BoxRaw<Frac>: UnwindSafe,
BoxRaw<Sqrt>: UnwindSafe,
BoxRaw<Scripts>: UnwindSafe,
BoxRaw<Limits>: UnwindSafe,
BoxRaw<Fence>: UnwindSafe,
BoxRaw<Matrix>: UnwindSafe,
BoxRaw<Accent>: UnwindSafe,
BoxRaw<BigOp>: UnwindSafe,
BoxRaw<Styled>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more