Skip to main content

LayoutCx

Struct LayoutCx 

Source
pub struct LayoutCx<'a, C: Context, I = ()> { /* private fields */ }

Implementations§

Source§

impl<'a, C: Context, I: 'static> LayoutCx<'a, C, I>

Source

pub fn node(&self) -> NodeId

Source

pub fn size(&self, child: NodeId) -> Size<C::Scalar>

Source

pub fn fit(&self, child: NodeId, axis: Axis) -> Fit<C::Scalar>

Source

pub fn children(&self) -> Children<'a> ⓘ

Source

pub fn item(&self, child: NodeId) -> &'a I

Source

pub fn fixed_extent(&self, child: NodeId, axis: Axis) -> Option<C::Scalar>

the extent a child resolves to regardless of bounds from motion or exact limits

Source

pub fn across(&mut self) -> C::Scalar

this node’s inner extent on the other axis

in fit(Y) this is the final inner width. in fit(X) this returns the own height limit when bounded (else unbounded) on round 0 and triggers a relayout round with settled heights

Source

pub fn set_extent(&mut self, child: NodeId, extent: C::Scalar) -> C::Scalar

Source

pub fn set_offset(&mut self, child: NodeId, offset: C::Scalar)

Source

pub fn request_frame(&mut self)

Source

pub fn context(&self) -> &C

Source

pub fn context_mut(&mut self) -> &mut C

Source

pub fn scratch(&self) -> &'a ScratchBuffer

Source

pub fn set_child_z_index(&mut self, child: NodeId, z_index: i16)

Auto Trait Implementations§

§

impl<'a, C, I = ()> !RefUnwindSafe for LayoutCx<'a, C, I>

§

impl<'a, C, I = ()> !Send for LayoutCx<'a, C, I>

§

impl<'a, C, I = ()> !Sync for LayoutCx<'a, C, I>

§

impl<'a, C, I = ()> !UnwindSafe for LayoutCx<'a, C, I>

§

impl<'a, C, I> Forget for LayoutCx<'a, C, I>

§

impl<'a, C, I> Freeze for LayoutCx<'a, C, I>
where &'a Tree<C>: Freeze, &'a BumpArena: Freeze, &'a mut [Rect<<C as Context>::Scalar>]: Freeze, &'a mut Vec<i16>: Freeze, &'a mut bool: Freeze, &'a mut [Size<Fit<<C as Context>::Scalar>>]: Freeze, &'a mut C: Freeze, &'a [MotionProps]: Freeze, <C as Context>::Scalar: Freeze, PhantomData<fn() -> I>: Freeze,

§

impl<'a, C, I> Move for LayoutCx<'a, C, I>

§

impl<'a, C, I> Unpin for LayoutCx<'a, C, I>
where &'a Tree<C>: Unpin, &'a BumpArena: Unpin, &'a mut [Rect<<C as Context>::Scalar>]: Unpin, &'a mut Vec<i16>: Unpin, &'a mut bool: Unpin, &'a mut [Size<Fit<<C as Context>::Scalar>>]: Unpin, &'a mut C: Unpin, &'a [MotionProps]: Unpin, <C as Context>::Scalar: Unpin,

§

impl<'a, C, I> UnsafeUnpin for LayoutCx<'a, C, I>
where &'a Tree<C>: UnsafeUnpin, &'a BumpArena: UnsafeUnpin, &'a mut [Rect<<C as Context>::Scalar>]: UnsafeUnpin, &'a mut Vec<i16>: UnsafeUnpin, &'a mut bool: UnsafeUnpin, &'a mut [Size<Fit<<C as Context>::Scalar>>]: UnsafeUnpin, &'a mut C: UnsafeUnpin, &'a [MotionProps]: UnsafeUnpin, <C as Context>::Scalar: UnsafeUnpin, PhantomData<fn() -> I>: UnsafeUnpin,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.