pub struct TableIntrinsic { /* private fields */ }Expand description
Intrinsic measurer for Table.
Natural size formula (matches the painter exactly):
row_height = font_size × DEFAULT_ROW_HEIGHT_RATIOheight = (1 + row_count) × row_height(header + data rows)width: ifcolumn_widthsare provided, their sum; otherwise each column getsmax(header_text_width + 2 × cell_padding, min_col_width).
Implementations§
Source§impl TableIntrinsic
impl TableIntrinsic
pub fn from_table(t: &Table) -> Self
Trait Implementations§
Source§impl IntrinsicMeasure for TableIntrinsic
impl IntrinsicMeasure for TableIntrinsic
Auto Trait Implementations§
impl Freeze for TableIntrinsic
impl RefUnwindSafe for TableIntrinsic
impl Send for TableIntrinsic
impl Sync for TableIntrinsic
impl Unpin for TableIntrinsic
impl UnsafeUnpin for TableIntrinsic
impl UnwindSafe for TableIntrinsic
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more