Struct layout_2020::taffy::layout::TaffyContainerContext
source · struct TaffyContainerContext<'a> {
source_child_nodes: &'a [ArcRefCell<TaffyItemBox>],
layout_context: &'a LayoutContext<'a>,
positioning_context: &'a mut PositioningContext,
content_box_size_override: &'a ContainingBlock<'a>,
style: &'a ComputedValues,
}
Expand description
Layout parameters and intermediate results about a taffy container, grouped to avoid passing around many parameters
Fields§
§source_child_nodes: &'a [ArcRefCell<TaffyItemBox>]
§layout_context: &'a LayoutContext<'a>
§positioning_context: &'a mut PositioningContext
§content_box_size_override: &'a ContainingBlock<'a>
§style: &'a ComputedValues
Trait Implementations§
source§impl LayoutGridContainer for TaffyContainerContext<'_>
impl LayoutGridContainer for TaffyContainerContext<'_>
source§type GridContainerStyle<'a> = TaffyStyloStyle<&'a ComputedValues>
where
Self: 'a
type GridContainerStyle<'a> = TaffyStyloStyle<&'a ComputedValues> where Self: 'a
The style type representing the CSS Grid container’s styles
source§type GridItemStyle<'a> = TaffyStyloStyle<AtomicRef<'a, ComputedValues>>
where
Self: 'a
type GridItemStyle<'a> = TaffyStyloStyle<AtomicRef<'a, ComputedValues>> where Self: 'a
The style type representing each CSS Grid item’s styles
source§fn get_grid_container_style(
&self,
_node_id: NodeId,
) -> Self::GridContainerStyle<'_>
fn get_grid_container_style( &self, _node_id: NodeId, ) -> Self::GridContainerStyle<'_>
Get the container’s styles
source§fn get_grid_child_style(&self, child_node_id: NodeId) -> Self::GridItemStyle<'_>
fn get_grid_child_style(&self, child_node_id: NodeId) -> Self::GridItemStyle<'_>
Get the child’s styles
source§impl LayoutPartialTree for TaffyContainerContext<'_>
impl LayoutPartialTree for TaffyContainerContext<'_>
source§type CoreContainerStyle<'a> = TaffyStyloStyle<&'a ComputedValues>
where
Self: 'a
type CoreContainerStyle<'a> = TaffyStyloStyle<&'a ComputedValues> where Self: 'a
The style type representing the core container styles that all containers should have
Used when laying out the root node of a tree
source§fn get_core_container_style(
&self,
_node_id: NodeId,
) -> Self::CoreContainerStyle<'_>
fn get_core_container_style( &self, _node_id: NodeId, ) -> Self::CoreContainerStyle<'_>
Get core style
source§fn set_unrounded_layout(&mut self, node_id: NodeId, layout: &Layout)
fn set_unrounded_layout(&mut self, node_id: NodeId, layout: &Layout)
Set the node’s unrounded layout
source§fn compute_child_layout(
&mut self,
node_id: NodeId,
inputs: LayoutInput,
) -> LayoutOutput
fn compute_child_layout( &mut self, node_id: NodeId, inputs: LayoutInput, ) -> LayoutOutput
Compute the specified node’s size or full layout given the specified constraints
source§impl TraversePartialTree for TaffyContainerContext<'_>
impl TraversePartialTree for TaffyContainerContext<'_>
source§type ChildIter<'a> = ChildIter
where
Self: 'a
type ChildIter<'a> = ChildIter where Self: 'a
Type representing an iterator of the children of a node
source§fn child_ids(&self, _node_id: NodeId) -> Self::ChildIter<'_>
fn child_ids(&self, _node_id: NodeId) -> Self::ChildIter<'_>
Get the list of children IDs for the given node
source§fn child_count(&self, _node_id: NodeId) -> usize
fn child_count(&self, _node_id: NodeId) -> usize
Get the number of children for the given node
Auto Trait Implementations§
impl<'a> Freeze for TaffyContainerContext<'a>
impl<'a> !RefUnwindSafe for TaffyContainerContext<'a>
impl<'a> Send for TaffyContainerContext<'a>
impl<'a> Sync for TaffyContainerContext<'a>
impl<'a> Unpin for TaffyContainerContext<'a>
impl<'a> !UnwindSafe for TaffyContainerContext<'a>
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