Use new with_* naming scheme

All builder-like functions are now named with_*. There is also now a way
to set each property imperatively with only a mutable reference.

The only widgets I haven't yet converted to this style are the Join*
widgets; they're a bit harder to figure out an appropriate API for.
This commit is contained in:
Joscha 2023-02-20 15:53:49 +01:00
parent cb483431cc
commit 607c11fea4
11 changed files with 125 additions and 90 deletions

View file

@ -4,8 +4,8 @@ use crate::{AsyncWidget, Frame, Size, Widget};
#[derive(Debug, Clone, Copy)]
pub struct Layer<I1, I2> {
below: I1,
above: I2,
pub below: I1,
pub above: I2,
}
impl<I1, I2> Layer<I1, I2> {