Enum layout_2013::model::CollapsibleMargins
source · pub enum CollapsibleMargins {
None(Au, Au),
Collapse(AdjoiningMargins, AdjoiningMargins),
CollapseThrough(AdjoiningMargins),
}
Expand description
Represents the block-start and block-end margins of a flow with collapsible margins. See CSS 2.1 § 8.3.1.
Variants§
None(Au, Au)
Margins may not collapse with this flow.
Collapse(AdjoiningMargins, AdjoiningMargins)
Both the block-start and block-end margins (specified here in that order) may collapse, but the margins do not collapse through this flow.
CollapseThrough(AdjoiningMargins)
Margins collapse through this flow. This means, essentially, that the flow doesn’t have any border, padding, or out-of-flow (floating or positioned) content
Implementations§
source§impl CollapsibleMargins
impl CollapsibleMargins
pub fn new() -> CollapsibleMargins
sourcepub fn block_start_margin_for_noncollapsible_context(&self) -> Au
pub fn block_start_margin_for_noncollapsible_context(&self) -> Au
Returns the amount of margin that should be applied in a noncollapsible context. This is currently used to apply block-start margin for hypothetical boxes, since we do not collapse margins of hypothetical boxes.
pub fn block_end_margin_for_noncollapsible_context(&self) -> Au
Trait Implementations§
source§impl Clone for CollapsibleMargins
impl Clone for CollapsibleMargins
source§fn clone(&self) -> CollapsibleMargins
fn clone(&self) -> CollapsibleMargins
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CollapsibleMargins
impl Debug for CollapsibleMargins
source§impl Default for CollapsibleMargins
impl Default for CollapsibleMargins
impl Copy for CollapsibleMargins
Auto Trait Implementations§
impl Freeze for CollapsibleMargins
impl RefUnwindSafe for CollapsibleMargins
impl Send for CollapsibleMargins
impl Sync for CollapsibleMargins
impl Unpin for CollapsibleMargins
impl UnwindSafe for CollapsibleMargins
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
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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.