[−][src]Struct kas::layout::GridSolver
A RulesSolver
for grids supporting cell-spans
This implementation relies on the caller to provide storage for solver data.
Implementations
impl<CSR: Default, RSR: Default, S: GridStorage> GridSolver<CSR, RSR, S>
[src]
pub fn new(
axis: AxisInfo,
(cols, rows): (usize, usize),
storage: &mut S
) -> Self
[src]
axis: AxisInfo,
(cols, rows): (usize, usize),
storage: &mut S
) -> Self
Construct.
Argument order is consistent with other RulesSolver
s.
axis
:AxisInfo
instance passed intosize_rules
(cols, rows)
: number of columns and rowsstorage
: reference to persistent storage
Trait Implementations
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)]>,
[src]
CSR: AsRef<[(SizeRules, u32, u32)]> + AsMut<[(SizeRules, u32, u32)]>,
RSR: AsRef<[(SizeRules, u32, u32)]> + AsMut<[(SizeRules, u32, u32)]>,
type Storage = S
Type of storage
type ChildInfo = GridChildInfo
Type required by RulesSolver::for_child
(see implementation documentation)
pub fn for_child<CR: FnOnce(AxisInfo) -> SizeRules>(
&mut self,
storage: &mut Self::Storage,
child_info: Self::ChildInfo,
child_rules: CR
)
[src]
&mut self,
storage: &mut Self::Storage,
child_info: Self::ChildInfo,
child_rules: CR
)
pub fn finish(self, storage: &mut Self::Storage) -> SizeRules
[src]
Auto Trait Implementations
impl<CSR, RSR, S> RefUnwindSafe for GridSolver<CSR, RSR, S> where
CSR: RefUnwindSafe,
RSR: RefUnwindSafe,
S: RefUnwindSafe,
CSR: RefUnwindSafe,
RSR: RefUnwindSafe,
S: RefUnwindSafe,
impl<CSR, RSR, S> Send for GridSolver<CSR, RSR, S> where
CSR: Send,
RSR: Send,
S: Send,
CSR: Send,
RSR: Send,
S: Send,
impl<CSR, RSR, S> Sync for GridSolver<CSR, RSR, S> where
CSR: Sync,
RSR: Sync,
S: Sync,
CSR: Sync,
RSR: Sync,
S: Sync,
impl<CSR, RSR, S> Unpin for GridSolver<CSR, RSR, S> where
CSR: Unpin,
RSR: Unpin,
S: Unpin,
CSR: Unpin,
RSR: Unpin,
S: Unpin,
impl<CSR, RSR, S> UnwindSafe for GridSolver<CSR, RSR, S> where
CSR: UnwindSafe,
RSR: UnwindSafe,
S: UnwindSafe,
CSR: UnwindSafe,
RSR: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,