pub struct OverlayLayout { /* private fields */ }Expand description
Layout used by Overlay to keep the base child’s size authoritative while
still allowing aligned overlay content.
Implementations§
Source§impl OverlayLayout
impl OverlayLayout
Sourcepub const fn alignment(self, alignment: Alignment) -> OverlayLayout
pub const fn alignment(self, alignment: Alignment) -> OverlayLayout
Sets the Alignment used to position overlay layers relative to the base.
Sourcepub const fn alignment_ref(&self) -> Alignment
pub const fn alignment_ref(&self) -> Alignment
Returns the current alignment.
Trait Implementations§
Source§impl Clone for OverlayLayout
impl Clone for OverlayLayout
Source§fn clone(&self) -> OverlayLayout
fn clone(&self) -> OverlayLayout
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OverlayLayout
impl Debug for OverlayLayout
Source§impl Default for OverlayLayout
impl Default for OverlayLayout
Source§fn default() -> OverlayLayout
fn default() -> OverlayLayout
Returns the “default value” for a type. Read more
Source§impl Layout for OverlayLayout
impl Layout for OverlayLayout
Source§fn stretch_axis(&self) -> StretchAxis
fn stretch_axis(&self) -> StretchAxis
Overlay stretches in both directions, allowing the base child to fill available space.
The actual size is determined by the base child in size_that_fits.
Source§fn size_that_fits(
&self,
proposal: ProposalSize,
children: &[&dyn SubView],
) -> Size
fn size_that_fits( &self, proposal: ProposalSize, children: &[&dyn SubView], ) -> Size
Calculate the size this layout wants given a proposal. Read more
Auto Trait Implementations§
impl Freeze for OverlayLayout
impl RefUnwindSafe for OverlayLayout
impl Send for OverlayLayout
impl Sync for OverlayLayout
impl Unpin for OverlayLayout
impl UnwindSafe for OverlayLayout
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)