pub enum LayoutDirection {
Ltr,
Rtl,
}Expand description
Reading direction of the application’s layout.
This is a framework-level setting. Individual widgets do not need to be re-authored for RTL — the engine consumes this value at every point where “left” or “right” would otherwise be hardcoded (sidebar side, toast anchor, header end-controls, etc.).
Variants§
Ltr
Left-to-right (e.g. English, Japanese, most languages).
Rtl
Right-to-left (e.g. Arabic, Hebrew, Persian).
Implementations§
Source§impl LayoutDirection
impl LayoutDirection
Sourcepub fn flipped(self) -> Self
pub fn flipped(self) -> Self
Flip the direction. Useful for a user-facing “Flip LTR / RTL” toggle during development or accessibility preference changes.
Sourcepub fn start_is_left(self) -> bool
pub fn start_is_left(self) -> bool
Returns true if the logical Edge::Start maps to the physical
left side of the screen under this direction.
Useful for engines when they need to decide whether a start-anchored element should be pushed first or last in a horizontal row.
Trait Implementations§
Source§impl Clone for LayoutDirection
impl Clone for LayoutDirection
Source§fn clone(&self) -> LayoutDirection
fn clone(&self) -> LayoutDirection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more