Trait Sized

Source
pub trait Sized: Padded {
    // Provided method
    fn size(&self) -> &Vec2 { ... }
}
Expand description

A sized leaf is one with inherent size, like an image. This is used to preserve aspect ratio when encounting an unsized axis. This must be provided in pixels.

Provided Methods§

Source

fn size(&self) -> &Vec2

Trait Implementations§

Source§

impl Desc for dyn Sized

Source§

type Props = dyn Sized

Source§

type Child = dyn Empty

Source§

type Children = PhantomData<dyn Layout<<dyn Sized as Desc>::Child>>

Source§

fn stage<'a>( props: &Self::Props, outer_area: AbsRect, outer_limits: AbsLimits, _: &Self::Children, id: Weak<SourceID>, renderable: Option<Rc<dyn Renderable>>, window: &mut WindowState, ) -> Box<dyn Staged + 'a>

Resolves a pending layout into a resolved node, which contains a pointer to the R-tree
Source§

impl<'a, T: Sized + 'static> From<&'a T> for &'a (dyn Sized + 'static)

Source§

fn from(value: &'a T) -> Self

Converts to this type from the input type.

Implementors§