Struct libbismuth::builders::HuggerPageBuilder
source · pub struct HuggerPageBuilder { /* private fields */ }Expand description
A builder-pattern type to construct HuggerPage objects.
Implementations§
source§impl HuggerPageBuilder
impl HuggerPageBuilder
sourcepub fn child(self, child: &impl IsA<Widget>) -> Self
pub fn child(self, child: &impl IsA<Widget>) -> Self
The the hugger child to which the page belongs.
sourcepub fn enabled(self, enabled: bool) -> Self
pub fn enabled(self, enabled: bool) -> Self
Whether the child is enabled.
If a child is disabled, it will be ignored when looking for the child fitting the available size best.
This allows to programmatically and prematurely hide a child even if it fits in the available space.
This can be used e.g. to ensure a certain child is hidden below a certain window width, or any other constraint you find suitable.
sourcepub fn build(self) -> HuggerPage
pub fn build(self) -> HuggerPage
Build the HuggerPage.
Auto Trait Implementations§
impl Freeze for HuggerPageBuilder
impl RefUnwindSafe for HuggerPageBuilder
impl !Send for HuggerPageBuilder
impl !Sync for HuggerPageBuilder
impl Unpin for HuggerPageBuilder
impl UnwindSafe for HuggerPageBuilder
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