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

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§

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,