[−][src]Struct kas::layout::RowSetter
A RulesSetter
for rows (and, without loss of generality, for columns).
This is parameterised over:
D:
Directional
— whether this represents a row or a columnT:
RowTemp
— temporary storage typeS:
RowStorage
— persistent storage type
Implementations
impl<D: Directional, T: RowTemp, S: RowStorage> RowSetter<D, T, S>
[src]
pub fn new(
rect: Rect,
(direction, len): (D, usize),
align: AlignHints,
storage: &mut S
) -> Self
[src]
rect: Rect,
(direction, len): (D, usize),
align: AlignHints,
storage: &mut S
) -> Self
Construct
Argument order is consistent with other RulesSetter
s.
rect
: theRect
within which to position children(direction, len)
: direction and number of itemsalign
: alignment hintsstorage
: access to the solver's storage
pub fn new_unsolved(
rect: Rect,
(direction, len): (D, usize),
storage: &mut S
) -> Self
[src]
rect: Rect,
(direction, len): (D, usize),
storage: &mut S
) -> Self
Construct without solving
In this case, it is assumed that the storage was already solved by a
previous RowSetter
. The user should optionally call solve_range
on
any ranges needing updating and finally call update_offsets
before
using this RowSetter
to calculate child positions.
It is also assumed that alignment is Align::Stretch
.
pub fn update_offsets(&mut self, storage: &mut S)
[src]
pub fn solve_range(&mut self, storage: &mut S, range: Range<usize>, width: u32)
[src]
Trait Implementations
impl<D: Directional, T: RowTemp, S: RowStorage> RulesSetter for RowSetter<D, T, S>
[src]
type Storage = S
Type of storage
type ChildInfo = usize
Type required by RulesSolver::for_child
(see implementation documentation)
pub fn child_rect(
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect
[src]
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect
pub fn maximal_rect_of(
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect
[src]
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect
Auto Trait Implementations
impl<D, T, S> RefUnwindSafe for RowSetter<D, T, S> where
D: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<D, T, S> Send for RowSetter<D, T, S> where
D: Send,
S: Send,
T: Send,
D: Send,
S: Send,
T: Send,
impl<D, T, S> Sync for RowSetter<D, T, S> where
D: Sync,
S: Sync,
T: Sync,
D: Sync,
S: Sync,
T: Sync,
impl<D, T, S> Unpin for RowSetter<D, T, S> where
D: Unpin,
S: Unpin,
T: Unpin,
D: Unpin,
S: Unpin,
T: Unpin,
impl<D, T, S> UnwindSafe for RowSetter<D, T, S> where
D: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
S: UnwindSafe,
T: 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>,