pub struct IgnoreSafeArea {
pub edges: EdgeSet,
}Expand description
Marker metadata indicating this view should ignore safe area insets.
When a native renderer encounters this metadata, it should:
- In propose phase: Use full screen bounds (not safe bounds) for the specified edges
- In place phase: Position the view in full screen coordinates for the specified edges
This allows backgrounds, images, and other visual elements to extend edge-to-edge while content remains in the safe area.
§Example
ⓘ
// Extend background to fill entire screen
Color::blue()
.ignore_safe_area(EdgeSet::ALL)
// Only extend to top (under status bar)
header_view
.ignore_safe_area(EdgeSet::TOP)Fields§
§edges: EdgeSetWhich edges should ignore the safe area.
Implementations§
Source§impl IgnoreSafeArea
impl IgnoreSafeArea
Sourcepub const fn new(edges: EdgeSet) -> Self
pub const fn new(edges: EdgeSet) -> Self
Creates a new IgnoreSafeArea with the specified edges.
Sourcepub const fn horizontal() -> Self
pub const fn horizontal() -> Self
Ignore safe area on horizontal edges (leading and trailing).
Trait Implementations§
Source§impl Clone for IgnoreSafeArea
impl Clone for IgnoreSafeArea
Source§fn clone(&self) -> IgnoreSafeArea
fn clone(&self) -> IgnoreSafeArea
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 IgnoreSafeArea
impl Debug for IgnoreSafeArea
Source§impl PartialEq for IgnoreSafeArea
impl PartialEq for IgnoreSafeArea
impl Copy for IgnoreSafeArea
impl Eq for IgnoreSafeArea
impl MetadataKey for IgnoreSafeArea
impl StructuralPartialEq for IgnoreSafeArea
Auto Trait Implementations§
impl Freeze for IgnoreSafeArea
impl RefUnwindSafe for IgnoreSafeArea
impl Send for IgnoreSafeArea
impl Sync for IgnoreSafeArea
impl Unpin for IgnoreSafeArea
impl UnwindSafe for IgnoreSafeArea
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)