Trait kas::layout::RulesSetter

source ·
pub trait RulesSetter {
    type Storage: Clone;
    type ChildInfo;

    // Required methods
    fn child_rect(
        &mut self,
        storage: &mut Self::Storage,
        child_info: Self::ChildInfo
    ) -> Rect;
    fn maximal_rect_of(
        &mut self,
        storage: &mut Self::Storage,
        index: Self::ChildInfo
    ) -> Rect;
}
Expand description

Resolves a RulesSolver solution for each child

Required Associated Types§

source

type Storage: Clone

Type of storage

source

type ChildInfo

Type required by RulesSolver::for_child (see implementation documentation)

Required Methods§

source

fn child_rect( &mut self, storage: &mut Self::Storage, child_info: Self::ChildInfo ) -> Rect

Called once for each child. The order is unimportant.

source

fn maximal_rect_of( &mut self, storage: &mut Self::Storage, index: Self::ChildInfo ) -> Rect

Calculates the maximal rect of a given child

This assumes that all other entries have minimum size.

Implementors§

source§

impl RulesSetter for SingleSetter

§

type Storage = ()

§

type ChildInfo = ()

source§

impl<CT, RT, S> RulesSetter for GridSetter<CT, RT, S>
where CT: RowTemp, RT: RowTemp, S: GridStorage,

source§

impl<D, T, S> RulesSetter for RowSetter<D, T, S>
where D: Directional, T: RowTemp, S: RowStorage,

§

type Storage = S

§

type ChildInfo = usize