Struct layout_2013::model::MarginCollapseInfo
source · pub struct MarginCollapseInfo {
pub state: MarginCollapseState,
pub block_start_margin: AdjoiningMargins,
pub margin_in: AdjoiningMargins,
}
Fields§
§state: MarginCollapseState
§block_start_margin: AdjoiningMargins
§margin_in: AdjoiningMargins
Implementations§
source§impl MarginCollapseInfo
impl MarginCollapseInfo
pub fn initialize_block_start_margin( fragment: &Fragment, can_collapse_block_start_margin_with_kids: bool, ) -> MarginCollapseInfo
pub fn finish_and_compute_collapsible_margins( self, fragment: &Fragment, containing_block_size: Option<Au>, can_collapse_block_end_margin_with_kids: bool, may_collapse_through: bool, ) -> (CollapsibleMargins, Au)
pub fn current_float_ceiling(&mut self) -> Au
sourcepub fn advance_block_start_margin(
&mut self,
child_collapsible_margins: &CollapsibleMargins,
can_collapse_block_start_margin: bool,
) -> Au
pub fn advance_block_start_margin( &mut self, child_collapsible_margins: &CollapsibleMargins, can_collapse_block_start_margin: bool, ) -> Au
Adds the child’s potentially collapsible block-start margin to the current margin state and advances the Y offset by the appropriate amount to handle that margin. Returns the amount that should be added to the Y offset during block layout.
sourcepub fn advance_block_end_margin(
&mut self,
child_collapsible_margins: &CollapsibleMargins,
) -> Au
pub fn advance_block_end_margin( &mut self, child_collapsible_margins: &CollapsibleMargins, ) -> Au
Adds the child’s potentially collapsible block-end margin to the current margin state and advances the Y offset by the appropriate amount to handle that margin. Returns the amount that should be added to the Y offset during block layout.
Auto Trait Implementations§
impl Freeze for MarginCollapseInfo
impl RefUnwindSafe for MarginCollapseInfo
impl Send for MarginCollapseInfo
impl Sync for MarginCollapseInfo
impl Unpin for MarginCollapseInfo
impl UnwindSafe for MarginCollapseInfo
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> 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>
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 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>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert