Struct layout_2020::flow::float::ContainingBlockPositionInfo
source · pub struct ContainingBlockPositionInfo {
pub(crate) block_start: Au,
pub(crate) block_start_margins_not_collapsed: CollapsedMargin,
pub inline_start: Au,
pub inline_end: Au,
}
Expand description
FloatContext
positions floats relative to the independent block formatting
context which contains the floating elements. The Fragment tree positions
elements relative to their containing blocks. This data structure is used to
help map between these two coordinate systems.
Fields§
§block_start: Au
The distance from the block start of the independent block formatting context that contains the floats and the block start of the current containing block, excluding uncollapsed block start margins. Note that this does not include uncollapsed block start margins because we don’t know the value of collapsed margins until we lay out children.
block_start_margins_not_collapsed: CollapsedMargin
Any uncollapsed block start margins that we have collected between the block start of the float containing independent block formatting context and this containing block, including for this containing block.
inline_start: Au
The distance from the inline start position of the float containing independent formatting context and the inline start of this containing block.
inline_end: Au
The offset from the inline start position of the float containing independent formatting context to the inline end of this containing block.
Implementations§
source§impl ContainingBlockPositionInfo
impl ContainingBlockPositionInfo
pub fn new_with_inline_offsets(inline_start: Au, inline_end: Au) -> Self
Trait Implementations§
source§impl Clone for ContainingBlockPositionInfo
impl Clone for ContainingBlockPositionInfo
source§fn clone(&self) -> ContainingBlockPositionInfo
fn clone(&self) -> ContainingBlockPositionInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContainingBlockPositionInfo
impl Debug for ContainingBlockPositionInfo
impl Copy for ContainingBlockPositionInfo
Auto Trait Implementations§
impl Freeze for ContainingBlockPositionInfo
impl RefUnwindSafe for ContainingBlockPositionInfo
impl Send for ContainingBlockPositionInfo
impl Sync for ContainingBlockPositionInfo
impl Unpin for ContainingBlockPositionInfo
impl UnwindSafe for ContainingBlockPositionInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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 more