Skip to main content

Place

Trait Place 

Source
pub trait Place<C: Context>: 'static {
    // Required method
    fn place(
        &self,
        cx: &mut PlaceCx<'_, C>,
        target: Rect<C::Scalar>,
    ) -> Point<C::Scalar>;
}
Expand description

positions a node outside its parent’s flow

Required Methods§

Source

fn place( &self, cx: &mut PlaceCx<'_, C>, target: Rect<C::Scalar>, ) -> Point<C::Scalar>

returns this node’s frame position

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<C: Context> Place<C> for ()

places at the target’s origin under unbounded constraints

Source§

fn place( &self, cx: &mut PlaceCx<'_, C>, target: Rect<C::Scalar>, ) -> Point<C::Scalar>

Implementors§