Struct layout_2013::flow::ContainingBlockLink
source · pub struct ContainingBlockLink {
link: Option<WeakFlowRef>,
}
Expand description
A link to a flow’s containing block.
This cannot safely be a Flow
pointer because this is a pointer up the tree, not down the
tree. A pointer up the tree is unsafe during layout because it can be used to access a node
with an immutable reference while that same node is being laid out, causing possible iterator
invalidation and use-after-free.
FIXME(pcwalton): I think this would be better with a borrow flag instead of unsafe
.
Fields§
§link: Option<WeakFlowRef>
The pointer up to the containing block.
Implementations§
source§impl ContainingBlockLink
impl ContainingBlockLink
fn new() -> ContainingBlockLink
fn set(&mut self, link: FlowRef)
pub fn generated_containing_block_size( &self, for_flow: OpaqueFlow, ) -> LogicalSize<Au>
pub fn explicit_block_containing_size( &self, shared_context: &SharedStyleContext<'_>, ) -> Option<Au>
Trait Implementations§
source§impl Clone for ContainingBlockLink
impl Clone for ContainingBlockLink
source§fn clone(&self) -> ContainingBlockLink
fn clone(&self) -> ContainingBlockLink
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 moreAuto Trait Implementations§
impl Freeze for ContainingBlockLink
impl !RefUnwindSafe for ContainingBlockLink
impl Send for ContainingBlockLink
impl Sync for ContainingBlockLink
impl Unpin for ContainingBlockLink
impl !UnwindSafe for ContainingBlockLink
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