Skip to main content

TableCell

Struct TableCell 

Source
pub struct TableCell<'src> { /* private fields */ }
Expand description

A single cell in a TableBlock.

Implementations§

Source§

impl<'src> TableCell<'src>

Source

pub fn h_align(&self) -> HorizontalAlignment

Returns the horizontal alignment of this cell’s content.

The alignment comes from a horizontal alignment operator (<, >, or ^) on the cell’s specifier, which overrides the column’s alignment. A cell with no horizontal alignment operator inherits its column’s h_align.

Source

pub fn v_align(&self) -> VerticalAlignment

Returns the vertical alignment of this cell’s content.

The alignment comes from a vertical alignment operator (.<, .>, or .^) on the cell’s specifier, which overrides the column’s alignment. A cell with no vertical alignment operator inherits its column’s v_align.

Source

pub fn style(&self) -> ColumnStyle

Returns the style applied to this cell’s content.

The style comes from a style operator in the last position of the cell’s specifier (a, d, e, h, l, m, or s), which overrides the column’s style. A cell with no style operator inherits its column’s style. A header cell is always Default, because the header row ignores style operators on both column and cell specifiers.

Source

pub fn colspan(&self) -> usize

Returns the number of columns this cell spans.

The span comes from a column span factor (<n>) or block span factor (<n>.<n>) in front of the span operator (+) on the cell’s specifier. A cell with no column span factor spans a single column, so the default is 1.

Source

pub fn rowspan(&self) -> usize

Returns the number of rows this cell spans.

The span comes from a row span factor (.<n>) or block span factor (<n>.<n>) in front of the span operator (+) on the cell’s specifier. A cell with no row span factor spans a single row, so the default is 1.

Source

pub fn content(&self) -> &TableCellContent<'src>

Returns the interpreted content of this cell.

Trait Implementations§

Source§

impl<'src> Clone for TableCell<'src>

Source§

fn clone(&self) -> TableCell<'src>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'src> Debug for TableCell<'src>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'src> Eq for TableCell<'src>

Source§

impl<'src> HasSpan<'src> for TableCell<'src>

Source§

fn span(&self) -> Span<'src>

Returns the cell’s source span, which begins at the cell’s content immediately after its separator. Its line is therefore the line on which the cell starts.

Source§

impl<'src> PartialEq for TableCell<'src>

Source§

fn eq(&self, other: &TableCell<'src>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'src> StructuralPartialEq for TableCell<'src>

Auto Trait Implementations§

§

impl<'src> Freeze for TableCell<'src>

§

impl<'src> RefUnwindSafe for TableCell<'src>

§

impl<'src> Send for TableCell<'src>

§

impl<'src> Sync for TableCell<'src>

§

impl<'src> Unpin for TableCell<'src>

§

impl<'src> UnsafeUnpin for TableCell<'src>

§

impl<'src> UnwindSafe for TableCell<'src>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.