pub struct InsetsDirectional {
pub top: f32,
pub end: f32,
pub bottom: f32,
pub start: f32,
}Expand description
Directional insets: start/end instead of left/right. In LTR, start
is the left; in RTL it is the right. Resolved into concrete Insets at layout
time.
Fields§
§top: f32The top inset, in logical pixels.
end: f32The end-edge inset (right in LTR, left in RTL), in logical pixels.
bottom: f32The bottom inset, in logical pixels.
start: f32The start-edge inset (left in LTR, right in RTL), in logical pixels.
Implementations§
Source§impl InsetsDirectional
impl InsetsDirectional
Sourcepub const fn new(top: f32, end: f32, bottom: f32, start: f32) -> Self
pub const fn new(top: f32, end: f32, bottom: f32, start: f32) -> Self
A directional inset per side, in logical pixels.
Sourcepub const fn horizontal(value: f32) -> Self
pub const fn horizontal(value: f32) -> Self
A symmetric horizontal start/end inset.
Sourcepub const fn only_start(value: f32) -> Self
pub const fn only_start(value: f32) -> Self
An inset on the start edge only: the left in a left-to-right script, the right in a right-to-left one.
Sourcepub fn resolve(self, direction: TextDirection) -> Insets
pub fn resolve(self, direction: TextDirection) -> Insets
Resolves to concrete insets for a direction: in RTL, start maps to right.
Trait Implementations§
Source§impl Clone for InsetsDirectional
impl Clone for InsetsDirectional
impl Copy for InsetsDirectional
Source§impl Debug for InsetsDirectional
impl Debug for InsetsDirectional
Source§impl Default for InsetsDirectional
impl Default for InsetsDirectional
Source§impl From<InsetsDirectional> for InsetsGeometry
impl From<InsetsDirectional> for InsetsGeometry
Source§fn from(insets: InsetsDirectional) -> Self
fn from(insets: InsetsDirectional) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InsetsDirectional
impl PartialEq for InsetsDirectional
impl StructuralPartialEq for InsetsDirectional
Auto Trait Implementations§
impl Freeze for InsetsDirectional
impl RefUnwindSafe for InsetsDirectional
impl Send for InsetsDirectional
impl Sync for InsetsDirectional
impl Unpin for InsetsDirectional
impl UnsafeUnpin for InsetsDirectional
impl UnwindSafe for InsetsDirectional
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