Struct layout_2013::table::ColumnIntrinsicInlineSize
source · pub struct ColumnIntrinsicInlineSize {
pub preferred: Au,
pub minimum_length: Au,
pub percentage: CSSFloat,
pub constrained: bool,
}
Expand description
Information about the intrinsic inline sizes of columns within a table.
During table inline-size bubbling, we might need to store both a percentage constraint and a specific width constraint. For instance, one cell might say that it wants to be 100 pixels wide in the inline direction and another cell might say that it wants to take up 20% of the inline- size of the table. Now because we bubble up these constraints during the bubble-inline-sizes phase of layout, we don’t know yet how wide the table is ultimately going to be in the inline direction. As we need to pick the maximum width of all cells for a column (in this case, the maximum of 100 pixels and 20% of the table), the preceding constraint means that we must potentially store both a specified width and a specified percentage, so that the inline-size assignment phase of layout will know which one to pick.
Fields§
§preferred: Au
The preferred intrinsic inline size.
minimum_length: Au
The largest specified size of this column as a length.
percentage: CSSFloat
The largest specified size of this column as a percentage (width
property).
constrained: bool
Whether the column inline size is constrained per INTRINSIC § 4.1.
Implementations§
source§impl ColumnIntrinsicInlineSize
impl ColumnIntrinsicInlineSize
sourcepub fn new() -> ColumnIntrinsicInlineSize
pub fn new() -> ColumnIntrinsicInlineSize
Returns a newly-initialized ColumnIntrinsicInlineSize
with all fields blank.
sourcepub fn greatest_percentage(&self, other: &ColumnIntrinsicInlineSize) -> CSSFloat
pub fn greatest_percentage(&self, other: &ColumnIntrinsicInlineSize) -> CSSFloat
Returns the higher of the two percentages specified in self
and other
.
Trait Implementations§
source§impl Clone for ColumnIntrinsicInlineSize
impl Clone for ColumnIntrinsicInlineSize
source§fn clone(&self) -> ColumnIntrinsicInlineSize
fn clone(&self) -> ColumnIntrinsicInlineSize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ColumnIntrinsicInlineSize
impl Debug for ColumnIntrinsicInlineSize
source§impl Default for ColumnIntrinsicInlineSize
impl Default for ColumnIntrinsicInlineSize
impl Copy for ColumnIntrinsicInlineSize
Auto Trait Implementations§
impl Freeze for ColumnIntrinsicInlineSize
impl RefUnwindSafe for ColumnIntrinsicInlineSize
impl Send for ColumnIntrinsicInlineSize
impl Sync for ColumnIntrinsicInlineSize
impl Unpin for ColumnIntrinsicInlineSize
impl UnwindSafe for ColumnIntrinsicInlineSize
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.