pub struct LayoutBuilder<'declaration, 'render, ImageElementData: 'render, CustomElementData: 'render> { /* private fields */ }
Expand description
Builder for configuring layout properties in a Declaration
.
Implementations§
Source§impl<'declaration, 'render, ImageElementData: 'render, CustomElementData: 'render> LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
impl<'declaration, 'render, ImageElementData: 'render, CustomElementData: 'render> LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
Sourcepub fn new(
parent: &'declaration mut Declaration<'render, ImageElementData, CustomElementData>,
) -> Self
pub fn new( parent: &'declaration mut Declaration<'render, ImageElementData, CustomElementData>, ) -> Self
Creates a new LayoutBuilder
with the given parent Declaration
.
Sourcepub fn child_gap(&mut self, child_gap: u16) -> &mut Self
pub fn child_gap(&mut self, child_gap: u16) -> &mut Self
Sets the spacing between child elements.
Sourcepub fn child_alignment(&mut self, child_alignment: Alignment) -> &mut Self
pub fn child_alignment(&mut self, child_alignment: Alignment) -> &mut Self
Sets the alignment of child elements.
Sourcepub fn direction(&mut self, direction: LayoutDirection) -> &mut Self
pub fn direction(&mut self, direction: LayoutDirection) -> &mut Self
Sets the layout direction.
Sourcepub fn end(
&mut self,
) -> &mut Declaration<'render, ImageElementData, CustomElementData>
pub fn end( &mut self, ) -> &mut Declaration<'render, ImageElementData, CustomElementData>
Returns the modified Declaration
.
Auto Trait Implementations§
impl<'declaration, 'render, ImageElementData, CustomElementData> Freeze for LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
impl<'declaration, 'render, ImageElementData, CustomElementData> RefUnwindSafe for LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>where
CustomElementData: RefUnwindSafe,
ImageElementData: RefUnwindSafe,
impl<'declaration, 'render, ImageElementData, CustomElementData> !Send for LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
impl<'declaration, 'render, ImageElementData, CustomElementData> !Sync for LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
impl<'declaration, 'render, ImageElementData, CustomElementData> Unpin for LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
impl<'declaration, 'render, ImageElementData, CustomElementData> !UnwindSafe for LayoutBuilder<'declaration, 'render, ImageElementData, CustomElementData>
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