#[repr(C)]pub struct SafeAreaInsets {
pub top: OptionPixelValue,
pub bottom: OptionPixelValue,
pub left: OptionPixelValue,
pub right: OptionPixelValue,
}Expand description
Safe area insets for devices with notches, rounded corners, or sensor housings.
On devices like iPhones with notches or Dynamic Island, the safe area indicates regions where content should not be placed to avoid being obscured by hardware features.
Fields§
§top: OptionPixelValueInset from the top edge (notch, camera housing, etc.)
bottom: OptionPixelValueInset from the bottom edge (home indicator on iPhone)
left: OptionPixelValueInset from the left edge (rounded corners)
right: OptionPixelValueInset from the right edge (rounded corners)
Trait Implementations§
Source§impl Clone for SafeAreaInsets
impl Clone for SafeAreaInsets
Source§fn clone(&self) -> SafeAreaInsets
fn clone(&self) -> SafeAreaInsets
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SafeAreaInsets
impl Debug for SafeAreaInsets
Source§impl Default for SafeAreaInsets
impl Default for SafeAreaInsets
Source§fn default() -> SafeAreaInsets
fn default() -> SafeAreaInsets
Returns the “default value” for a type. Read more
Source§impl PartialEq for SafeAreaInsets
impl PartialEq for SafeAreaInsets
impl Copy for SafeAreaInsets
impl StructuralPartialEq for SafeAreaInsets
Auto Trait Implementations§
impl Freeze for SafeAreaInsets
impl RefUnwindSafe for SafeAreaInsets
impl Send for SafeAreaInsets
impl Sync for SafeAreaInsets
impl Unpin for SafeAreaInsets
impl UnsafeUnpin for SafeAreaInsets
impl UnwindSafe for SafeAreaInsets
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