layout_2020::taffy::layout

Struct 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,
    specific_layout_info: Option<SpecificLayoutInfo>,
    child_specific_layout_infos: Vec<Option<SpecificLayoutInfo>>,
}
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§specific_layout_info: Option<SpecificLayoutInfo>§child_specific_layout_infos: Vec<Option<SpecificLayoutInfo>>

Temporary location for children specific info, which will be moved into child fragments

Trait Implementations§

Source§

impl LayoutGridContainer for TaffyContainerContext<'_>

Source§

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

The style type representing each CSS Grid item’s styles
Source§

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<'_>

Get the child’s styles
Source§

fn set_detailed_grid_info( &mut self, _node_id: NodeId, specific_layout_info: DetailedGridInfo, )

Set the node’s detailed grid information Read more
Source§

impl LayoutPartialTree for TaffyContainerContext<'_>

Source§

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<'_>

Get core style
Source§

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

Compute the specified node’s size or full layout given the specified constraints
Source§

impl TraversePartialTree for TaffyContainerContext<'_>

Source§

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<'_>

Get the list of children IDs for the given node
Source§

fn child_count(&self, _node_id: NodeId) -> usize

Get the number of children for the given node
Source§

fn get_child_id(&self, _node_id: NodeId, index: usize) -> NodeId

Get a specific child of a node, where the index represents the nth child

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,