Trait 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§