Struct Section
pub struct Section { /* private fields */ }Expand description
One section: a key (stable, what the layout remembers it by), a title, an optional count, its least height, its rows’ height and whether it starts open.
Implementations§
§impl Section
impl Section
pub fn new(key: impl Into<String>, title: impl Into<String>) -> Section
pub fn new(key: impl Into<String>, title: impl Into<String>) -> Section
An open section with no count.
pub fn count(self, count: u64) -> Section
pub fn count(self, count: u64) -> Section
The count on its band (99+ past 99 with the default painter; its name says the real
count).
pub fn min_height(self, points: f32) -> Section
pub fn min_height(self, points: f32) -> Section
Its body’s least height, in points. By default, room for two rows; for a windowed
section (Stack::rows), two rows, or all of them when it has fewer.
pub fn max_height(self, points: f32) -> Section
pub fn max_height(self, points: f32) -> Section
Its body’s greatest height, in points (no bound by default). Sized by the list, it never
grows past it, and the room it leaves goes to the other sections, or stays empty under the
last band when none can take it; a drag on its boundary stops there. Never below its least
height (Section::min_height): the least wins.
Section::max_height as a share of the stack’s height (its bands included): 0.5, at
most half of it. Never below its least height either.
pub fn row_height(self, points: f32) -> Section
pub fn row_height(self, points: f32) -> Section
The height of its rows, in points, at least one (by default the style’s, row_height):
what its least height counts, and what Stack::rows windows by.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl UnwindSafe for Section
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more