Skip to main content

LogicalStyledExt

Trait LogicalStyledExt 

Source
pub trait LogicalStyledExt: Styled + Sized {
Show 15 methods // Provided methods fn ps(self, length: impl Into<DefiniteLength> + Clone, cx: &App) -> Self { ... } fn pe(self, length: impl Into<DefiniteLength> + Clone, cx: &App) -> Self { ... } fn ms(self, length: impl Into<Length> + Clone, cx: &App) -> Self { ... } fn me(self, length: impl Into<Length> + Clone, cx: &App) -> Self { ... } fn inset_s(self, length: impl Into<Length> + Clone, cx: &App) -> Self { ... } fn inset_e(self, length: impl Into<Length> + Clone, cx: &App) -> Self { ... } fn border_s(self, width: impl Into<AbsoluteLength>, cx: &App) -> Self { ... } fn border_e(self, width: impl Into<AbsoluteLength>, cx: &App) -> Self { ... } fn rounded_s( self, radius: impl Into<AbsoluteLength> + Clone, cx: &App, ) -> Self { ... } fn rounded_e( self, radius: impl Into<AbsoluteLength> + Clone, cx: &App, ) -> Self { ... } fn flex_row_dir(self, cx: &App) -> Self { ... } fn justify_flex_start(self) -> Self { ... } fn justify_flex_end(self) -> Self { ... } fn text_start(self, cx: &App) -> Self { ... } fn text_end(self, cx: &App) -> Self { ... }
}
Expand description

Styling helpers that follow LayoutDirection::global: s (start) is the left edge in LTR and the right edge in RTL, e (end) the opposite.

Provided Methods§

Source

fn ps(self, length: impl Into<DefiniteLength> + Clone, cx: &App) -> Self

Padding on the start edge.

Source

fn pe(self, length: impl Into<DefiniteLength> + Clone, cx: &App) -> Self

Padding on the end edge.

Source

fn ms(self, length: impl Into<Length> + Clone, cx: &App) -> Self

Margin on the start edge.

Source

fn me(self, length: impl Into<Length> + Clone, cx: &App) -> Self

Margin on the end edge.

Source

fn inset_s(self, length: impl Into<Length> + Clone, cx: &App) -> Self

Inset from the start edge of the positioned ancestor.

Source

fn inset_e(self, length: impl Into<Length> + Clone, cx: &App) -> Self

Inset from the end edge of the positioned ancestor.

Source

fn border_s(self, width: impl Into<AbsoluteLength>, cx: &App) -> Self

Border width on the start edge.

Source

fn border_e(self, width: impl Into<AbsoluteLength>, cx: &App) -> Self

Border width on the end edge.

Source

fn rounded_s(self, radius: impl Into<AbsoluteLength> + Clone, cx: &App) -> Self

Corner radius of both start corners.

Source

fn rounded_e(self, radius: impl Into<AbsoluteLength> + Clone, cx: &App) -> Self

Corner radius of both end corners.

Source

fn flex_row_dir(self, cx: &App) -> Self

A horizontal flex row whose first child sits on the start edge: flex_row in LTR, flex_row_reverse in RTL.

Source

fn justify_flex_start(self) -> Self

Packs a row’s children against the edge its first child sits on — the start edge of a flex_row_dir row.

justify_start is the physical left edge even in a reversed row, so it does not follow the layout direction; this is CSS flex-start.

Source

fn justify_flex_end(self) -> Self

Packs a row’s children against the edge its last child sits on — the end edge of a flex_row_dir row. This is CSS flex-end; justify_end stays on the physical right edge.

Source

fn text_start(self, cx: &App) -> Self

Aligns text to the start edge: text_left in LTR, text_right in RTL.

Source

fn text_end(self, cx: &App) -> Self

Aligns text to the end edge: text_right in LTR, text_left in RTL.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§