#[non_exhaustive]pub struct Budget {
pub columns: u32,
pub floors: u32,
}Expand description
What the columns kept at a cutoff ask for.
Counted in ch and in columns, and never in a host’s unit: each renderer
turns it into its own with Budget::width, which is the one gap model
every native renderer budgets by.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.columns: u32How many columns are kept.
floors: u32Their floors, summed, in ch.
Implementations§
Source§impl Budget
impl Budget
Sourcepub fn width(self, ch: f32, gap: f32) -> f32
pub fn width(self, ch: f32, gap: f32) -> f32
The width these columns need, at ch per ch and gap between
adjacent columns and at each edge.
floors * ch + gap * (columns + 1). A terminal passes one cell per ch
and its column spacing; an immediate-mode painter passes the width of a
figure and its cell padding on both sides. One formula, so a table
drops a column at the same declared width in both.
Trait Implementations§
impl Copy for Budget
impl Eq for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Forget for Budget
impl Freeze for Budget
impl Move for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
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
Mutably borrows from an owned value. Read more