Struct kas_core::layout::GridSolver
source · pub struct GridSolver<CSR, RSR, S: GridStorage> { /* private fields */ }
Expand description
A RulesSolver
for grids supporting cell-spans
This implementation relies on the caller to provide storage for solver data.
Implementations§
source§impl<CSR: DefaultWithLen, RSR: DefaultWithLen, S: GridStorage> GridSolver<CSR, RSR, S>
impl<CSR: DefaultWithLen, RSR: DefaultWithLen, S: GridStorage> GridSolver<CSR, RSR, S>
sourcepub fn new(axis: AxisInfo, dim: GridDimensions, storage: &mut S) -> Self
pub fn new(axis: AxisInfo, dim: GridDimensions, storage: &mut S) -> Self
Construct.
Argument order is consistent with other RulesSolver
s.
axis
:AxisInfo
instance passed intosize_rules
dim
: grid dimensionsstorage
: reference to persistent storage
Trait Implementations§
source§impl<CSR, RSR, S: GridStorage> RulesSolver for GridSolver<CSR, RSR, S>where
CSR: AsRef<[(SizeRules, u32, u32)]> + AsMut<[(SizeRules, u32, u32)]>,
RSR: AsRef<[(SizeRules, u32, u32)]> + AsMut<[(SizeRules, u32, u32)]>,
impl<CSR, RSR, S: GridStorage> RulesSolver for GridSolver<CSR, RSR, S>where
CSR: AsRef<[(SizeRules, u32, u32)]> + AsMut<[(SizeRules, u32, u32)]>,
RSR: AsRef<[(SizeRules, u32, u32)]> + AsMut<[(SizeRules, u32, u32)]>,
§type ChildInfo = GridChildInfo
type ChildInfo = GridChildInfo
Type required by
RulesSolver::for_child
(see implementation documentation)Auto Trait Implementations§
impl<CSR, RSR, S> RefUnwindSafe for GridSolver<CSR, RSR, S>where
CSR: RefUnwindSafe,
RSR: RefUnwindSafe,
S: RefUnwindSafe,
impl<CSR, RSR, S> Send for GridSolver<CSR, RSR, S>where
CSR: Send,
RSR: Send,
S: Send,
impl<CSR, RSR, S> Sync for GridSolver<CSR, RSR, S>where
CSR: Sync,
RSR: Sync,
S: Sync,
impl<CSR, RSR, S> Unpin for GridSolver<CSR, RSR, S>where
CSR: Unpin,
RSR: Unpin,
S: Unpin,
impl<CSR, RSR, S> UnwindSafe for GridSolver<CSR, RSR, S>where
CSR: UnwindSafe,
RSR: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more