[][src]Struct kas::layout::RowSetter

pub struct RowSetter<D, T: RowTemp, S: RowStorage> { /* fields omitted */ }

A RulesSetter for rows (and, without loss of generality, for columns).

This is parameterised over:

  • D: Directional — whether this represents a row or a column
  • T: RowTemp — temporary storage type
  • S: 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]

Construct

Argument order is consistent with other RulesSetters.

  • rect: the Rect within which to position children
  • (direction, len): direction and number of items
  • align: alignment hints
  • storage: access to the solver's storage

pub fn new_unsolved(
    rect: Rect,
    (direction, len): (D, usize),
    storage: &mut S
) -> Self
[src]

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)

Auto Trait Implementations

impl<D, T, S> RefUnwindSafe for RowSetter<D, T, S> where
    D: RefUnwindSafe,
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<D, T, S> Send for RowSetter<D, T, S> where
    D: Send,
    S: Send,
    T: Send

impl<D, T, S> Sync for RowSetter<D, T, S> where
    D: Sync,
    S: Sync,
    T: Sync

impl<D, T, S> Unpin for RowSetter<D, T, S> where
    D: Unpin,
    S: Unpin,
    T: Unpin

impl<D, T, S> UnwindSafe for RowSetter<D, T, S> where
    D: UnwindSafe,
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.