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 ZERO: InsetsDirectional
pub const ZERO: InsetsDirectional
No inset on any side.
Sourcepub const fn new(
top: f32,
end: f32,
bottom: f32,
start: f32,
) -> InsetsDirectional
pub const fn new( top: f32, end: f32, bottom: f32, start: f32, ) -> InsetsDirectional
A directional inset per side, in logical pixels.
Sourcepub const fn horizontal(value: f32) -> InsetsDirectional
pub const fn horizontal(value: f32) -> InsetsDirectional
A symmetric horizontal start/end inset.
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
Source§fn clone(&self) -> InsetsDirectional
fn clone(&self) -> InsetsDirectional
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InsetsDirectional
Source§impl Debug for InsetsDirectional
impl Debug for InsetsDirectional
Source§impl Default for InsetsDirectional
impl Default for InsetsDirectional
Source§fn default() -> InsetsDirectional
fn default() -> InsetsDirectional
Returns the “default value” for a type. Read more
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