#[non_exhaustive]pub struct Sizing<'a, L> {
pub lengths: &'a [(&'a str, L)],
pub fallback: L,
}Expand description
The lengths a description defers, looked up by column name: terminal cells
here, as Sizing<'_, u16>.
The lengths a description deferred, in a renderer’s own unit.
Width says Content, Fixed or Fill and carries no magnitude,
because a magnitude is an answer for one renderer. Each renderer holds this
over its own unit (cells, points, CSS lengths) and looks a column up by
name, because an app’s columns are not all one size.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lengths: &'a [(&'a str, L)](column name, length): the track for a Width::Fixed column and the
floor for a Width::Fill one.
fallback: LUsed for a column with no entry above.
Implementations§
Trait Implementations§
impl<'a, L> Copy for Sizing<'a, L>where
L: Copy,
impl<'a, L> StructuralPartialEq for Sizing<'a, L>where
L: PartialEq,
Auto Trait Implementations§
impl<'a, L> Forget for Sizing<'a, L>
impl<'a, L> Freeze for Sizing<'a, L>
impl<'a, L> RefUnwindSafe for Sizing<'a, L>
impl<'a, L> Send for Sizing<'a, L>
impl<'a, L> Sync for Sizing<'a, L>
impl<'a, L> Unpin for Sizing<'a, L>
impl<'a, L> UnsafeUnpin for Sizing<'a, L>
impl<'a, L> UnwindSafe for Sizing<'a, L>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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