Skip to main content

Label

Struct Label 

Source
pub struct Label { /* private fields */ }
Expand description

A struct representing a label element in the UI.

The Label struct stores the label text and common properties for a label element. It provides methods for modifying these properties.

§Examples

use ui::prelude::*;

Label::new("Hello, World!");

A colored label, for example labeling a dangerous action:

use ui::prelude::*;

let my_label = Label::new("Delete").color(Color::Error);

A label with a strikethrough, for example labeling something that has been deleted:

use ui::prelude::*;

let my_label = Label::new("Deleted").strikethrough();

Implementations§

Source§

impl Label

Source

pub fn new(label: impl Into<SharedString>) -> Self

Creates a new Label with the given text.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!");
Source

pub fn render_code_spans(self) -> Self

When enabled, text wrapped in backticks (e.g. `code`) will be rendered in the buffer (monospace) font.

Source

pub fn set_text(&mut self, text: impl Into<SharedString>)

Sets the text of the Label.

Source

pub fn truncate_start(self) -> Self

Truncates the label from the start, keeping the end visible.

Source§

impl Label

Source

pub fn m(self, length: impl Clone + Into<Length>) -> Self

Sets the margin of the element. Docs

Source

pub fn m_0(self) -> Self

Sets the margin of the element. Docs

0px

Source

pub fn m_neg_0(self) -> Self

Sets the margin of the element. Docs

0px

Source

pub fn m_0p5(self) -> Self

Sets the margin of the element. Docs

2px (0.125rem)

Source

pub fn m_neg_0p5(self) -> Self

Sets the margin of the element. Docs

2px (0.125rem)

Source

pub fn m_1(self) -> Self

Sets the margin of the element. Docs

4px (0.25rem)

Source

pub fn m_neg_1(self) -> Self

Sets the margin of the element. Docs

4px (0.25rem)

Source

pub fn m_1p5(self) -> Self

Sets the margin of the element. Docs

6px (0.375rem)

Source

pub fn m_neg_1p5(self) -> Self

Sets the margin of the element. Docs

6px (0.375rem)

Source

pub fn m_2(self) -> Self

Sets the margin of the element. Docs

8px (0.5rem)

Source

pub fn m_neg_2(self) -> Self

Sets the margin of the element. Docs

8px (0.5rem)

Source

pub fn m_2p5(self) -> Self

Sets the margin of the element. Docs

10px (0.625rem)

Source

pub fn m_neg_2p5(self) -> Self

Sets the margin of the element. Docs

10px (0.625rem)

Source

pub fn m_3(self) -> Self

Sets the margin of the element. Docs

12px (0.75rem)

Source

pub fn m_neg_3(self) -> Self

Sets the margin of the element. Docs

12px (0.75rem)

Source

pub fn m_3p5(self) -> Self

Sets the margin of the element. Docs

14px (0.875rem)

Source

pub fn m_neg_3p5(self) -> Self

Sets the margin of the element. Docs

14px (0.875rem)

Source

pub fn m_4(self) -> Self

Sets the margin of the element. Docs

16px (1rem)

Source

pub fn m_neg_4(self) -> Self

Sets the margin of the element. Docs

16px (1rem)

Source

pub fn m_5(self) -> Self

Sets the margin of the element. Docs

20px (1.25rem)

Source

pub fn m_neg_5(self) -> Self

Sets the margin of the element. Docs

20px (1.25rem)

Source

pub fn m_6(self) -> Self

Sets the margin of the element. Docs

24px (1.5rem)

Source

pub fn m_neg_6(self) -> Self

Sets the margin of the element. Docs

24px (1.5rem)

Source

pub fn m_7(self) -> Self

Sets the margin of the element. Docs

28px (1.75rem)

Source

pub fn m_neg_7(self) -> Self

Sets the margin of the element. Docs

28px (1.75rem)

Source

pub fn m_8(self) -> Self

Sets the margin of the element. Docs

32px (2rem)

Source

pub fn m_neg_8(self) -> Self

Sets the margin of the element. Docs

32px (2rem)

Source

pub fn m_9(self) -> Self

Sets the margin of the element. Docs

36px (2.25rem)

Source

pub fn m_neg_9(self) -> Self

Sets the margin of the element. Docs

36px (2.25rem)

Source

pub fn m_10(self) -> Self

Sets the margin of the element. Docs

40px (2.5rem)

Source

pub fn m_neg_10(self) -> Self

Sets the margin of the element. Docs

40px (2.5rem)

Source

pub fn m_11(self) -> Self

Sets the margin of the element. Docs

44px (2.75rem)

Source

pub fn m_neg_11(self) -> Self

Sets the margin of the element. Docs

44px (2.75rem)

Source

pub fn m_12(self) -> Self

Sets the margin of the element. Docs

48px (3rem)

Source

pub fn m_neg_12(self) -> Self

Sets the margin of the element. Docs

48px (3rem)

Source

pub fn m_16(self) -> Self

Sets the margin of the element. Docs

64px (4rem)

Source

pub fn m_neg_16(self) -> Self

Sets the margin of the element. Docs

64px (4rem)

Source

pub fn m_20(self) -> Self

Sets the margin of the element. Docs

80px (5rem)

Source

pub fn m_neg_20(self) -> Self

Sets the margin of the element. Docs

80px (5rem)

Source

pub fn m_24(self) -> Self

Sets the margin of the element. Docs

96px (6rem)

Source

pub fn m_neg_24(self) -> Self

Sets the margin of the element. Docs

96px (6rem)

Source

pub fn m_32(self) -> Self

Sets the margin of the element. Docs

128px (8rem)

Source

pub fn m_neg_32(self) -> Self

Sets the margin of the element. Docs

128px (8rem)

Source

pub fn m_40(self) -> Self

Sets the margin of the element. Docs

160px (10rem)

Source

pub fn m_neg_40(self) -> Self

Sets the margin of the element. Docs

160px (10rem)

Source

pub fn m_48(self) -> Self

Sets the margin of the element. Docs

192px (12rem)

Source

pub fn m_neg_48(self) -> Self

Sets the margin of the element. Docs

192px (12rem)

Source

pub fn m_56(self) -> Self

Sets the margin of the element. Docs

224px (14rem)

Source

pub fn m_neg_56(self) -> Self

Sets the margin of the element. Docs

224px (14rem)

Source

pub fn m_64(self) -> Self

Sets the margin of the element. Docs

256px (16rem)

Source

pub fn m_neg_64(self) -> Self

Sets the margin of the element. Docs

256px (16rem)

Source

pub fn m_72(self) -> Self

Sets the margin of the element. Docs

288px (18rem)

Source

pub fn m_neg_72(self) -> Self

Sets the margin of the element. Docs

288px (18rem)

Source

pub fn m_80(self) -> Self

Sets the margin of the element. Docs

320px (20rem)

Source

pub fn m_neg_80(self) -> Self

Sets the margin of the element. Docs

320px (20rem)

Source

pub fn m_96(self) -> Self

Sets the margin of the element. Docs

384px (24rem)

Source

pub fn m_neg_96(self) -> Self

Sets the margin of the element. Docs

384px (24rem)

Source

pub fn m_112(self) -> Self

Sets the margin of the element. Docs

448px (28rem)

Source

pub fn m_neg_112(self) -> Self

Sets the margin of the element. Docs

448px (28rem)

Source

pub fn m_128(self) -> Self

Sets the margin of the element. Docs

512px (32rem)

Source

pub fn m_neg_128(self) -> Self

Sets the margin of the element. Docs

512px (32rem)

Source

pub fn m_auto(self) -> Self

Sets the margin of the element. Docs

Auto

Source

pub fn m_px(self) -> Self

Sets the margin of the element. Docs

1px

Source

pub fn m_neg_px(self) -> Self

Sets the margin of the element. Docs

1px

Source

pub fn m_full(self) -> Self

Sets the margin of the element. Docs

100%

Source

pub fn m_neg_full(self) -> Self

Sets the margin of the element. Docs

100%

Source

pub fn m_1_2(self) -> Self

Sets the margin of the element. Docs

50% (1/2)

Source

pub fn m_neg_1_2(self) -> Self

Sets the margin of the element. Docs

50% (1/2)

Source

pub fn m_1_3(self) -> Self

Sets the margin of the element. Docs

33% (1/3)

Source

pub fn m_neg_1_3(self) -> Self

Sets the margin of the element. Docs

33% (1/3)

Source

pub fn m_2_3(self) -> Self

Sets the margin of the element. Docs

66% (2/3)

Source

pub fn m_neg_2_3(self) -> Self

Sets the margin of the element. Docs

66% (2/3)

Source

pub fn m_1_4(self) -> Self

Sets the margin of the element. Docs

25% (1/4)

Source

pub fn m_neg_1_4(self) -> Self

Sets the margin of the element. Docs

25% (1/4)

Source

pub fn m_2_4(self) -> Self

Sets the margin of the element. Docs

50% (2/4)

Source

pub fn m_neg_2_4(self) -> Self

Sets the margin of the element. Docs

50% (2/4)

Source

pub fn m_3_4(self) -> Self

Sets the margin of the element. Docs

75% (3/4)

Source

pub fn m_neg_3_4(self) -> Self

Sets the margin of the element. Docs

75% (3/4)

Source

pub fn m_1_5(self) -> Self

Sets the margin of the element. Docs

20% (1/5)

Source

pub fn m_neg_1_5(self) -> Self

Sets the margin of the element. Docs

20% (1/5)

Source

pub fn m_2_5(self) -> Self

Sets the margin of the element. Docs

40% (2/5)

Source

pub fn m_neg_2_5(self) -> Self

Sets the margin of the element. Docs

40% (2/5)

Source

pub fn m_3_5(self) -> Self

Sets the margin of the element. Docs

60% (3/5)

Source

pub fn m_neg_3_5(self) -> Self

Sets the margin of the element. Docs

60% (3/5)

Source

pub fn m_4_5(self) -> Self

Sets the margin of the element. Docs

80% (4/5)

Source

pub fn m_neg_4_5(self) -> Self

Sets the margin of the element. Docs

80% (4/5)

Source

pub fn m_1_6(self) -> Self

Sets the margin of the element. Docs

16% (1/6)

Source

pub fn m_neg_1_6(self) -> Self

Sets the margin of the element. Docs

16% (1/6)

Source

pub fn m_5_6(self) -> Self

Sets the margin of the element. Docs

80% (5/6)

Source

pub fn m_neg_5_6(self) -> Self

Sets the margin of the element. Docs

80% (5/6)

Source

pub fn m_1_12(self) -> Self

Sets the margin of the element. Docs

8% (1/12)

Source

pub fn m_neg_1_12(self) -> Self

Sets the margin of the element. Docs

8% (1/12)

Source

pub fn mt(self, length: impl Clone + Into<Length>) -> Self

Sets the top margin of the element. Docs

Source

pub fn mt_0(self) -> Self

Sets the top margin of the element. Docs

0px

Source

pub fn mt_neg_0(self) -> Self

Sets the top margin of the element. Docs

0px

Source

pub fn mt_0p5(self) -> Self

Sets the top margin of the element. Docs

2px (0.125rem)

Source

pub fn mt_neg_0p5(self) -> Self

Sets the top margin of the element. Docs

2px (0.125rem)

Source

pub fn mt_1(self) -> Self

Sets the top margin of the element. Docs

4px (0.25rem)

Source

pub fn mt_neg_1(self) -> Self

Sets the top margin of the element. Docs

4px (0.25rem)

Source

pub fn mt_1p5(self) -> Self

Sets the top margin of the element. Docs

6px (0.375rem)

Source

pub fn mt_neg_1p5(self) -> Self

Sets the top margin of the element. Docs

6px (0.375rem)

Source

pub fn mt_2(self) -> Self

Sets the top margin of the element. Docs

8px (0.5rem)

Source

pub fn mt_neg_2(self) -> Self

Sets the top margin of the element. Docs

8px (0.5rem)

Source

pub fn mt_2p5(self) -> Self

Sets the top margin of the element. Docs

10px (0.625rem)

Source

pub fn mt_neg_2p5(self) -> Self

Sets the top margin of the element. Docs

10px (0.625rem)

Source

pub fn mt_3(self) -> Self

Sets the top margin of the element. Docs

12px (0.75rem)

Source

pub fn mt_neg_3(self) -> Self

Sets the top margin of the element. Docs

12px (0.75rem)

Source

pub fn mt_3p5(self) -> Self

Sets the top margin of the element. Docs

14px (0.875rem)

Source

pub fn mt_neg_3p5(self) -> Self

Sets the top margin of the element. Docs

14px (0.875rem)

Source

pub fn mt_4(self) -> Self

Sets the top margin of the element. Docs

16px (1rem)

Source

pub fn mt_neg_4(self) -> Self

Sets the top margin of the element. Docs

16px (1rem)

Source

pub fn mt_5(self) -> Self

Sets the top margin of the element. Docs

20px (1.25rem)

Source

pub fn mt_neg_5(self) -> Self

Sets the top margin of the element. Docs

20px (1.25rem)

Source

pub fn mt_6(self) -> Self

Sets the top margin of the element. Docs

24px (1.5rem)

Source

pub fn mt_neg_6(self) -> Self

Sets the top margin of the element. Docs

24px (1.5rem)

Source

pub fn mt_7(self) -> Self

Sets the top margin of the element. Docs

28px (1.75rem)

Source

pub fn mt_neg_7(self) -> Self

Sets the top margin of the element. Docs

28px (1.75rem)

Source

pub fn mt_8(self) -> Self

Sets the top margin of the element. Docs

32px (2rem)

Source

pub fn mt_neg_8(self) -> Self

Sets the top margin of the element. Docs

32px (2rem)

Source

pub fn mt_9(self) -> Self

Sets the top margin of the element. Docs

36px (2.25rem)

Source

pub fn mt_neg_9(self) -> Self

Sets the top margin of the element. Docs

36px (2.25rem)

Source

pub fn mt_10(self) -> Self

Sets the top margin of the element. Docs

40px (2.5rem)

Source

pub fn mt_neg_10(self) -> Self

Sets the top margin of the element. Docs

40px (2.5rem)

Source

pub fn mt_11(self) -> Self

Sets the top margin of the element. Docs

44px (2.75rem)

Source

pub fn mt_neg_11(self) -> Self

Sets the top margin of the element. Docs

44px (2.75rem)

Source

pub fn mt_12(self) -> Self

Sets the top margin of the element. Docs

48px (3rem)

Source

pub fn mt_neg_12(self) -> Self

Sets the top margin of the element. Docs

48px (3rem)

Source

pub fn mt_16(self) -> Self

Sets the top margin of the element. Docs

64px (4rem)

Source

pub fn mt_neg_16(self) -> Self

Sets the top margin of the element. Docs

64px (4rem)

Source

pub fn mt_20(self) -> Self

Sets the top margin of the element. Docs

80px (5rem)

Source

pub fn mt_neg_20(self) -> Self

Sets the top margin of the element. Docs

80px (5rem)

Source

pub fn mt_24(self) -> Self

Sets the top margin of the element. Docs

96px (6rem)

Source

pub fn mt_neg_24(self) -> Self

Sets the top margin of the element. Docs

96px (6rem)

Source

pub fn mt_32(self) -> Self

Sets the top margin of the element. Docs

128px (8rem)

Source

pub fn mt_neg_32(self) -> Self

Sets the top margin of the element. Docs

128px (8rem)

Source

pub fn mt_40(self) -> Self

Sets the top margin of the element. Docs

160px (10rem)

Source

pub fn mt_neg_40(self) -> Self

Sets the top margin of the element. Docs

160px (10rem)

Source

pub fn mt_48(self) -> Self

Sets the top margin of the element. Docs

192px (12rem)

Source

pub fn mt_neg_48(self) -> Self

Sets the top margin of the element. Docs

192px (12rem)

Source

pub fn mt_56(self) -> Self

Sets the top margin of the element. Docs

224px (14rem)

Source

pub fn mt_neg_56(self) -> Self

Sets the top margin of the element. Docs

224px (14rem)

Source

pub fn mt_64(self) -> Self

Sets the top margin of the element. Docs

256px (16rem)

Source

pub fn mt_neg_64(self) -> Self

Sets the top margin of the element. Docs

256px (16rem)

Source

pub fn mt_72(self) -> Self

Sets the top margin of the element. Docs

288px (18rem)

Source

pub fn mt_neg_72(self) -> Self

Sets the top margin of the element. Docs

288px (18rem)

Source

pub fn mt_80(self) -> Self

Sets the top margin of the element. Docs

320px (20rem)

Source

pub fn mt_neg_80(self) -> Self

Sets the top margin of the element. Docs

320px (20rem)

Source

pub fn mt_96(self) -> Self

Sets the top margin of the element. Docs

384px (24rem)

Source

pub fn mt_neg_96(self) -> Self

Sets the top margin of the element. Docs

384px (24rem)

Source

pub fn mt_112(self) -> Self

Sets the top margin of the element. Docs

448px (28rem)

Source

pub fn mt_neg_112(self) -> Self

Sets the top margin of the element. Docs

448px (28rem)

Source

pub fn mt_128(self) -> Self

Sets the top margin of the element. Docs

512px (32rem)

Source

pub fn mt_neg_128(self) -> Self

Sets the top margin of the element. Docs

512px (32rem)

Source

pub fn mt_auto(self) -> Self

Sets the top margin of the element. Docs

Auto

Source

pub fn mt_px(self) -> Self

Sets the top margin of the element. Docs

1px

Source

pub fn mt_neg_px(self) -> Self

Sets the top margin of the element. Docs

1px

Source

pub fn mt_full(self) -> Self

Sets the top margin of the element. Docs

100%

Source

pub fn mt_neg_full(self) -> Self

Sets the top margin of the element. Docs

100%

Source

pub fn mt_1_2(self) -> Self

Sets the top margin of the element. Docs

50% (1/2)

Source

pub fn mt_neg_1_2(self) -> Self

Sets the top margin of the element. Docs

50% (1/2)

Source

pub fn mt_1_3(self) -> Self

Sets the top margin of the element. Docs

33% (1/3)

Source

pub fn mt_neg_1_3(self) -> Self

Sets the top margin of the element. Docs

33% (1/3)

Source

pub fn mt_2_3(self) -> Self

Sets the top margin of the element. Docs

66% (2/3)

Source

pub fn mt_neg_2_3(self) -> Self

Sets the top margin of the element. Docs

66% (2/3)

Source

pub fn mt_1_4(self) -> Self

Sets the top margin of the element. Docs

25% (1/4)

Source

pub fn mt_neg_1_4(self) -> Self

Sets the top margin of the element. Docs

25% (1/4)

Source

pub fn mt_2_4(self) -> Self

Sets the top margin of the element. Docs

50% (2/4)

Source

pub fn mt_neg_2_4(self) -> Self

Sets the top margin of the element. Docs

50% (2/4)

Source

pub fn mt_3_4(self) -> Self

Sets the top margin of the element. Docs

75% (3/4)

Source

pub fn mt_neg_3_4(self) -> Self

Sets the top margin of the element. Docs

75% (3/4)

Source

pub fn mt_1_5(self) -> Self

Sets the top margin of the element. Docs

20% (1/5)

Source

pub fn mt_neg_1_5(self) -> Self

Sets the top margin of the element. Docs

20% (1/5)

Source

pub fn mt_2_5(self) -> Self

Sets the top margin of the element. Docs

40% (2/5)

Source

pub fn mt_neg_2_5(self) -> Self

Sets the top margin of the element. Docs

40% (2/5)

Source

pub fn mt_3_5(self) -> Self

Sets the top margin of the element. Docs

60% (3/5)

Source

pub fn mt_neg_3_5(self) -> Self

Sets the top margin of the element. Docs

60% (3/5)

Source

pub fn mt_4_5(self) -> Self

Sets the top margin of the element. Docs

80% (4/5)

Source

pub fn mt_neg_4_5(self) -> Self

Sets the top margin of the element. Docs

80% (4/5)

Source

pub fn mt_1_6(self) -> Self

Sets the top margin of the element. Docs

16% (1/6)

Source

pub fn mt_neg_1_6(self) -> Self

Sets the top margin of the element. Docs

16% (1/6)

Source

pub fn mt_5_6(self) -> Self

Sets the top margin of the element. Docs

80% (5/6)

Source

pub fn mt_neg_5_6(self) -> Self

Sets the top margin of the element. Docs

80% (5/6)

Source

pub fn mt_1_12(self) -> Self

Sets the top margin of the element. Docs

8% (1/12)

Source

pub fn mt_neg_1_12(self) -> Self

Sets the top margin of the element. Docs

8% (1/12)

Source

pub fn mb(self, length: impl Clone + Into<Length>) -> Self

Sets the bottom margin of the element. Docs

Source

pub fn mb_0(self) -> Self

Sets the bottom margin of the element. Docs

0px

Source

pub fn mb_neg_0(self) -> Self

Sets the bottom margin of the element. Docs

0px

Source

pub fn mb_0p5(self) -> Self

Sets the bottom margin of the element. Docs

2px (0.125rem)

Source

pub fn mb_neg_0p5(self) -> Self

Sets the bottom margin of the element. Docs

2px (0.125rem)

Source

pub fn mb_1(self) -> Self

Sets the bottom margin of the element. Docs

4px (0.25rem)

Source

pub fn mb_neg_1(self) -> Self

Sets the bottom margin of the element. Docs

4px (0.25rem)

Source

pub fn mb_1p5(self) -> Self

Sets the bottom margin of the element. Docs

6px (0.375rem)

Source

pub fn mb_neg_1p5(self) -> Self

Sets the bottom margin of the element. Docs

6px (0.375rem)

Source

pub fn mb_2(self) -> Self

Sets the bottom margin of the element. Docs

8px (0.5rem)

Source

pub fn mb_neg_2(self) -> Self

Sets the bottom margin of the element. Docs

8px (0.5rem)

Source

pub fn mb_2p5(self) -> Self

Sets the bottom margin of the element. Docs

10px (0.625rem)

Source

pub fn mb_neg_2p5(self) -> Self

Sets the bottom margin of the element. Docs

10px (0.625rem)

Source

pub fn mb_3(self) -> Self

Sets the bottom margin of the element. Docs

12px (0.75rem)

Source

pub fn mb_neg_3(self) -> Self

Sets the bottom margin of the element. Docs

12px (0.75rem)

Source

pub fn mb_3p5(self) -> Self

Sets the bottom margin of the element. Docs

14px (0.875rem)

Source

pub fn mb_neg_3p5(self) -> Self

Sets the bottom margin of the element. Docs

14px (0.875rem)

Source

pub fn mb_4(self) -> Self

Sets the bottom margin of the element. Docs

16px (1rem)

Source

pub fn mb_neg_4(self) -> Self

Sets the bottom margin of the element. Docs

16px (1rem)

Source

pub fn mb_5(self) -> Self

Sets the bottom margin of the element. Docs

20px (1.25rem)

Source

pub fn mb_neg_5(self) -> Self

Sets the bottom margin of the element. Docs

20px (1.25rem)

Source

pub fn mb_6(self) -> Self

Sets the bottom margin of the element. Docs

24px (1.5rem)

Source

pub fn mb_neg_6(self) -> Self

Sets the bottom margin of the element. Docs

24px (1.5rem)

Source

pub fn mb_7(self) -> Self

Sets the bottom margin of the element. Docs

28px (1.75rem)

Source

pub fn mb_neg_7(self) -> Self

Sets the bottom margin of the element. Docs

28px (1.75rem)

Source

pub fn mb_8(self) -> Self

Sets the bottom margin of the element. Docs

32px (2rem)

Source

pub fn mb_neg_8(self) -> Self

Sets the bottom margin of the element. Docs

32px (2rem)

Source

pub fn mb_9(self) -> Self

Sets the bottom margin of the element. Docs

36px (2.25rem)

Source

pub fn mb_neg_9(self) -> Self

Sets the bottom margin of the element. Docs

36px (2.25rem)

Source

pub fn mb_10(self) -> Self

Sets the bottom margin of the element. Docs

40px (2.5rem)

Source

pub fn mb_neg_10(self) -> Self

Sets the bottom margin of the element. Docs

40px (2.5rem)

Source

pub fn mb_11(self) -> Self

Sets the bottom margin of the element. Docs

44px (2.75rem)

Source

pub fn mb_neg_11(self) -> Self

Sets the bottom margin of the element. Docs

44px (2.75rem)

Source

pub fn mb_12(self) -> Self

Sets the bottom margin of the element. Docs

48px (3rem)

Source

pub fn mb_neg_12(self) -> Self

Sets the bottom margin of the element. Docs

48px (3rem)

Source

pub fn mb_16(self) -> Self

Sets the bottom margin of the element. Docs

64px (4rem)

Source

pub fn mb_neg_16(self) -> Self

Sets the bottom margin of the element. Docs

64px (4rem)

Source

pub fn mb_20(self) -> Self

Sets the bottom margin of the element. Docs

80px (5rem)

Source

pub fn mb_neg_20(self) -> Self

Sets the bottom margin of the element. Docs

80px (5rem)

Source

pub fn mb_24(self) -> Self

Sets the bottom margin of the element. Docs

96px (6rem)

Source

pub fn mb_neg_24(self) -> Self

Sets the bottom margin of the element. Docs

96px (6rem)

Source

pub fn mb_32(self) -> Self

Sets the bottom margin of the element. Docs

128px (8rem)

Source

pub fn mb_neg_32(self) -> Self

Sets the bottom margin of the element. Docs

128px (8rem)

Source

pub fn mb_40(self) -> Self

Sets the bottom margin of the element. Docs

160px (10rem)

Source

pub fn mb_neg_40(self) -> Self

Sets the bottom margin of the element. Docs

160px (10rem)

Source

pub fn mb_48(self) -> Self

Sets the bottom margin of the element. Docs

192px (12rem)

Source

pub fn mb_neg_48(self) -> Self

Sets the bottom margin of the element. Docs

192px (12rem)

Source

pub fn mb_56(self) -> Self

Sets the bottom margin of the element. Docs

224px (14rem)

Source

pub fn mb_neg_56(self) -> Self

Sets the bottom margin of the element. Docs

224px (14rem)

Source

pub fn mb_64(self) -> Self

Sets the bottom margin of the element. Docs

256px (16rem)

Source

pub fn mb_neg_64(self) -> Self

Sets the bottom margin of the element. Docs

256px (16rem)

Source

pub fn mb_72(self) -> Self

Sets the bottom margin of the element. Docs

288px (18rem)

Source

pub fn mb_neg_72(self) -> Self

Sets the bottom margin of the element. Docs

288px (18rem)

Source

pub fn mb_80(self) -> Self

Sets the bottom margin of the element. Docs

320px (20rem)

Source

pub fn mb_neg_80(self) -> Self

Sets the bottom margin of the element. Docs

320px (20rem)

Source

pub fn mb_96(self) -> Self

Sets the bottom margin of the element. Docs

384px (24rem)

Source

pub fn mb_neg_96(self) -> Self

Sets the bottom margin of the element. Docs

384px (24rem)

Source

pub fn mb_112(self) -> Self

Sets the bottom margin of the element. Docs

448px (28rem)

Source

pub fn mb_neg_112(self) -> Self

Sets the bottom margin of the element. Docs

448px (28rem)

Source

pub fn mb_128(self) -> Self

Sets the bottom margin of the element. Docs

512px (32rem)

Source

pub fn mb_neg_128(self) -> Self

Sets the bottom margin of the element. Docs

512px (32rem)

Source

pub fn mb_auto(self) -> Self

Sets the bottom margin of the element. Docs

Auto

Source

pub fn mb_px(self) -> Self

Sets the bottom margin of the element. Docs

1px

Source

pub fn mb_neg_px(self) -> Self

Sets the bottom margin of the element. Docs

1px

Source

pub fn mb_full(self) -> Self

Sets the bottom margin of the element. Docs

100%

Source

pub fn mb_neg_full(self) -> Self

Sets the bottom margin of the element. Docs

100%

Source

pub fn mb_1_2(self) -> Self

Sets the bottom margin of the element. Docs

50% (1/2)

Source

pub fn mb_neg_1_2(self) -> Self

Sets the bottom margin of the element. Docs

50% (1/2)

Source

pub fn mb_1_3(self) -> Self

Sets the bottom margin of the element. Docs

33% (1/3)

Source

pub fn mb_neg_1_3(self) -> Self

Sets the bottom margin of the element. Docs

33% (1/3)

Source

pub fn mb_2_3(self) -> Self

Sets the bottom margin of the element. Docs

66% (2/3)

Source

pub fn mb_neg_2_3(self) -> Self

Sets the bottom margin of the element. Docs

66% (2/3)

Source

pub fn mb_1_4(self) -> Self

Sets the bottom margin of the element. Docs

25% (1/4)

Source

pub fn mb_neg_1_4(self) -> Self

Sets the bottom margin of the element. Docs

25% (1/4)

Source

pub fn mb_2_4(self) -> Self

Sets the bottom margin of the element. Docs

50% (2/4)

Source

pub fn mb_neg_2_4(self) -> Self

Sets the bottom margin of the element. Docs

50% (2/4)

Source

pub fn mb_3_4(self) -> Self

Sets the bottom margin of the element. Docs

75% (3/4)

Source

pub fn mb_neg_3_4(self) -> Self

Sets the bottom margin of the element. Docs

75% (3/4)

Source

pub fn mb_1_5(self) -> Self

Sets the bottom margin of the element. Docs

20% (1/5)

Source

pub fn mb_neg_1_5(self) -> Self

Sets the bottom margin of the element. Docs

20% (1/5)

Source

pub fn mb_2_5(self) -> Self

Sets the bottom margin of the element. Docs

40% (2/5)

Source

pub fn mb_neg_2_5(self) -> Self

Sets the bottom margin of the element. Docs

40% (2/5)

Source

pub fn mb_3_5(self) -> Self

Sets the bottom margin of the element. Docs

60% (3/5)

Source

pub fn mb_neg_3_5(self) -> Self

Sets the bottom margin of the element. Docs

60% (3/5)

Source

pub fn mb_4_5(self) -> Self

Sets the bottom margin of the element. Docs

80% (4/5)

Source

pub fn mb_neg_4_5(self) -> Self

Sets the bottom margin of the element. Docs

80% (4/5)

Source

pub fn mb_1_6(self) -> Self

Sets the bottom margin of the element. Docs

16% (1/6)

Source

pub fn mb_neg_1_6(self) -> Self

Sets the bottom margin of the element. Docs

16% (1/6)

Source

pub fn mb_5_6(self) -> Self

Sets the bottom margin of the element. Docs

80% (5/6)

Source

pub fn mb_neg_5_6(self) -> Self

Sets the bottom margin of the element. Docs

80% (5/6)

Source

pub fn mb_1_12(self) -> Self

Sets the bottom margin of the element. Docs

8% (1/12)

Source

pub fn mb_neg_1_12(self) -> Self

Sets the bottom margin of the element. Docs

8% (1/12)

Source

pub fn my(self, length: impl Clone + Into<Length>) -> Self

Sets the vertical margin of the element. Docs

Source

pub fn my_0(self) -> Self

Sets the vertical margin of the element. Docs

0px

Source

pub fn my_neg_0(self) -> Self

Sets the vertical margin of the element. Docs

0px

Source

pub fn my_0p5(self) -> Self

Sets the vertical margin of the element. Docs

2px (0.125rem)

Source

pub fn my_neg_0p5(self) -> Self

Sets the vertical margin of the element. Docs

2px (0.125rem)

Source

pub fn my_1(self) -> Self

Sets the vertical margin of the element. Docs

4px (0.25rem)

Source

pub fn my_neg_1(self) -> Self

Sets the vertical margin of the element. Docs

4px (0.25rem)

Source

pub fn my_1p5(self) -> Self

Sets the vertical margin of the element. Docs

6px (0.375rem)

Source

pub fn my_neg_1p5(self) -> Self

Sets the vertical margin of the element. Docs

6px (0.375rem)

Source

pub fn my_2(self) -> Self

Sets the vertical margin of the element. Docs

8px (0.5rem)

Source

pub fn my_neg_2(self) -> Self

Sets the vertical margin of the element. Docs

8px (0.5rem)

Source

pub fn my_2p5(self) -> Self

Sets the vertical margin of the element. Docs

10px (0.625rem)

Source

pub fn my_neg_2p5(self) -> Self

Sets the vertical margin of the element. Docs

10px (0.625rem)

Source

pub fn my_3(self) -> Self

Sets the vertical margin of the element. Docs

12px (0.75rem)

Source

pub fn my_neg_3(self) -> Self

Sets the vertical margin of the element. Docs

12px (0.75rem)

Source

pub fn my_3p5(self) -> Self

Sets the vertical margin of the element. Docs

14px (0.875rem)

Source

pub fn my_neg_3p5(self) -> Self

Sets the vertical margin of the element. Docs

14px (0.875rem)

Source

pub fn my_4(self) -> Self

Sets the vertical margin of the element. Docs

16px (1rem)

Source

pub fn my_neg_4(self) -> Self

Sets the vertical margin of the element. Docs

16px (1rem)

Source

pub fn my_5(self) -> Self

Sets the vertical margin of the element. Docs

20px (1.25rem)

Source

pub fn my_neg_5(self) -> Self

Sets the vertical margin of the element. Docs

20px (1.25rem)

Source

pub fn my_6(self) -> Self

Sets the vertical margin of the element. Docs

24px (1.5rem)

Source

pub fn my_neg_6(self) -> Self

Sets the vertical margin of the element. Docs

24px (1.5rem)

Source

pub fn my_7(self) -> Self

Sets the vertical margin of the element. Docs

28px (1.75rem)

Source

pub fn my_neg_7(self) -> Self

Sets the vertical margin of the element. Docs

28px (1.75rem)

Source

pub fn my_8(self) -> Self

Sets the vertical margin of the element. Docs

32px (2rem)

Source

pub fn my_neg_8(self) -> Self

Sets the vertical margin of the element. Docs

32px (2rem)

Source

pub fn my_9(self) -> Self

Sets the vertical margin of the element. Docs

36px (2.25rem)

Source

pub fn my_neg_9(self) -> Self

Sets the vertical margin of the element. Docs

36px (2.25rem)

Source

pub fn my_10(self) -> Self

Sets the vertical margin of the element. Docs

40px (2.5rem)

Source

pub fn my_neg_10(self) -> Self

Sets the vertical margin of the element. Docs

40px (2.5rem)

Source

pub fn my_11(self) -> Self

Sets the vertical margin of the element. Docs

44px (2.75rem)

Source

pub fn my_neg_11(self) -> Self

Sets the vertical margin of the element. Docs

44px (2.75rem)

Source

pub fn my_12(self) -> Self

Sets the vertical margin of the element. Docs

48px (3rem)

Source

pub fn my_neg_12(self) -> Self

Sets the vertical margin of the element. Docs

48px (3rem)

Source

pub fn my_16(self) -> Self

Sets the vertical margin of the element. Docs

64px (4rem)

Source

pub fn my_neg_16(self) -> Self

Sets the vertical margin of the element. Docs

64px (4rem)

Source

pub fn my_20(self) -> Self

Sets the vertical margin of the element. Docs

80px (5rem)

Source

pub fn my_neg_20(self) -> Self

Sets the vertical margin of the element. Docs

80px (5rem)

Source

pub fn my_24(self) -> Self

Sets the vertical margin of the element. Docs

96px (6rem)

Source

pub fn my_neg_24(self) -> Self

Sets the vertical margin of the element. Docs

96px (6rem)

Source

pub fn my_32(self) -> Self

Sets the vertical margin of the element. Docs

128px (8rem)

Source

pub fn my_neg_32(self) -> Self

Sets the vertical margin of the element. Docs

128px (8rem)

Source

pub fn my_40(self) -> Self

Sets the vertical margin of the element. Docs

160px (10rem)

Source

pub fn my_neg_40(self) -> Self

Sets the vertical margin of the element. Docs

160px (10rem)

Source

pub fn my_48(self) -> Self

Sets the vertical margin of the element. Docs

192px (12rem)

Source

pub fn my_neg_48(self) -> Self

Sets the vertical margin of the element. Docs

192px (12rem)

Source

pub fn my_56(self) -> Self

Sets the vertical margin of the element. Docs

224px (14rem)

Source

pub fn my_neg_56(self) -> Self

Sets the vertical margin of the element. Docs

224px (14rem)

Source

pub fn my_64(self) -> Self

Sets the vertical margin of the element. Docs

256px (16rem)

Source

pub fn my_neg_64(self) -> Self

Sets the vertical margin of the element. Docs

256px (16rem)

Source

pub fn my_72(self) -> Self

Sets the vertical margin of the element. Docs

288px (18rem)

Source

pub fn my_neg_72(self) -> Self

Sets the vertical margin of the element. Docs

288px (18rem)

Source

pub fn my_80(self) -> Self

Sets the vertical margin of the element. Docs

320px (20rem)

Source

pub fn my_neg_80(self) -> Self

Sets the vertical margin of the element. Docs

320px (20rem)

Source

pub fn my_96(self) -> Self

Sets the vertical margin of the element. Docs

384px (24rem)

Source

pub fn my_neg_96(self) -> Self

Sets the vertical margin of the element. Docs

384px (24rem)

Source

pub fn my_112(self) -> Self

Sets the vertical margin of the element. Docs

448px (28rem)

Source

pub fn my_neg_112(self) -> Self

Sets the vertical margin of the element. Docs

448px (28rem)

Source

pub fn my_128(self) -> Self

Sets the vertical margin of the element. Docs

512px (32rem)

Source

pub fn my_neg_128(self) -> Self

Sets the vertical margin of the element. Docs

512px (32rem)

Source

pub fn my_auto(self) -> Self

Sets the vertical margin of the element. Docs

Auto

Source

pub fn my_px(self) -> Self

Sets the vertical margin of the element. Docs

1px

Source

pub fn my_neg_px(self) -> Self

Sets the vertical margin of the element. Docs

1px

Source

pub fn my_full(self) -> Self

Sets the vertical margin of the element. Docs

100%

Source

pub fn my_neg_full(self) -> Self

Sets the vertical margin of the element. Docs

100%

Source

pub fn my_1_2(self) -> Self

Sets the vertical margin of the element. Docs

50% (1/2)

Source

pub fn my_neg_1_2(self) -> Self

Sets the vertical margin of the element. Docs

50% (1/2)

Source

pub fn my_1_3(self) -> Self

Sets the vertical margin of the element. Docs

33% (1/3)

Source

pub fn my_neg_1_3(self) -> Self

Sets the vertical margin of the element. Docs

33% (1/3)

Source

pub fn my_2_3(self) -> Self

Sets the vertical margin of the element. Docs

66% (2/3)

Source

pub fn my_neg_2_3(self) -> Self

Sets the vertical margin of the element. Docs

66% (2/3)

Source

pub fn my_1_4(self) -> Self

Sets the vertical margin of the element. Docs

25% (1/4)

Source

pub fn my_neg_1_4(self) -> Self

Sets the vertical margin of the element. Docs

25% (1/4)

Source

pub fn my_2_4(self) -> Self

Sets the vertical margin of the element. Docs

50% (2/4)

Source

pub fn my_neg_2_4(self) -> Self

Sets the vertical margin of the element. Docs

50% (2/4)

Source

pub fn my_3_4(self) -> Self

Sets the vertical margin of the element. Docs

75% (3/4)

Source

pub fn my_neg_3_4(self) -> Self

Sets the vertical margin of the element. Docs

75% (3/4)

Source

pub fn my_1_5(self) -> Self

Sets the vertical margin of the element. Docs

20% (1/5)

Source

pub fn my_neg_1_5(self) -> Self

Sets the vertical margin of the element. Docs

20% (1/5)

Source

pub fn my_2_5(self) -> Self

Sets the vertical margin of the element. Docs

40% (2/5)

Source

pub fn my_neg_2_5(self) -> Self

Sets the vertical margin of the element. Docs

40% (2/5)

Source

pub fn my_3_5(self) -> Self

Sets the vertical margin of the element. Docs

60% (3/5)

Source

pub fn my_neg_3_5(self) -> Self

Sets the vertical margin of the element. Docs

60% (3/5)

Source

pub fn my_4_5(self) -> Self

Sets the vertical margin of the element. Docs

80% (4/5)

Source

pub fn my_neg_4_5(self) -> Self

Sets the vertical margin of the element. Docs

80% (4/5)

Source

pub fn my_1_6(self) -> Self

Sets the vertical margin of the element. Docs

16% (1/6)

Source

pub fn my_neg_1_6(self) -> Self

Sets the vertical margin of the element. Docs

16% (1/6)

Source

pub fn my_5_6(self) -> Self

Sets the vertical margin of the element. Docs

80% (5/6)

Source

pub fn my_neg_5_6(self) -> Self

Sets the vertical margin of the element. Docs

80% (5/6)

Source

pub fn my_1_12(self) -> Self

Sets the vertical margin of the element. Docs

8% (1/12)

Source

pub fn my_neg_1_12(self) -> Self

Sets the vertical margin of the element. Docs

8% (1/12)

Source

pub fn mx(self, length: impl Clone + Into<Length>) -> Self

Sets the horizontal margin of the element. Docs

Source

pub fn mx_0(self) -> Self

Sets the horizontal margin of the element. Docs

0px

Source

pub fn mx_neg_0(self) -> Self

Sets the horizontal margin of the element. Docs

0px

Source

pub fn mx_0p5(self) -> Self

Sets the horizontal margin of the element. Docs

2px (0.125rem)

Source

pub fn mx_neg_0p5(self) -> Self

Sets the horizontal margin of the element. Docs

2px (0.125rem)

Source

pub fn mx_1(self) -> Self

Sets the horizontal margin of the element. Docs

4px (0.25rem)

Source

pub fn mx_neg_1(self) -> Self

Sets the horizontal margin of the element. Docs

4px (0.25rem)

Source

pub fn mx_1p5(self) -> Self

Sets the horizontal margin of the element. Docs

6px (0.375rem)

Source

pub fn mx_neg_1p5(self) -> Self

Sets the horizontal margin of the element. Docs

6px (0.375rem)

Source

pub fn mx_2(self) -> Self

Sets the horizontal margin of the element. Docs

8px (0.5rem)

Source

pub fn mx_neg_2(self) -> Self

Sets the horizontal margin of the element. Docs

8px (0.5rem)

Source

pub fn mx_2p5(self) -> Self

Sets the horizontal margin of the element. Docs

10px (0.625rem)

Source

pub fn mx_neg_2p5(self) -> Self

Sets the horizontal margin of the element. Docs

10px (0.625rem)

Source

pub fn mx_3(self) -> Self

Sets the horizontal margin of the element. Docs

12px (0.75rem)

Source

pub fn mx_neg_3(self) -> Self

Sets the horizontal margin of the element. Docs

12px (0.75rem)

Source

pub fn mx_3p5(self) -> Self

Sets the horizontal margin of the element. Docs

14px (0.875rem)

Source

pub fn mx_neg_3p5(self) -> Self

Sets the horizontal margin of the element. Docs

14px (0.875rem)

Source

pub fn mx_4(self) -> Self

Sets the horizontal margin of the element. Docs

16px (1rem)

Source

pub fn mx_neg_4(self) -> Self

Sets the horizontal margin of the element. Docs

16px (1rem)

Source

pub fn mx_5(self) -> Self

Sets the horizontal margin of the element. Docs

20px (1.25rem)

Source

pub fn mx_neg_5(self) -> Self

Sets the horizontal margin of the element. Docs

20px (1.25rem)

Source

pub fn mx_6(self) -> Self

Sets the horizontal margin of the element. Docs

24px (1.5rem)

Source

pub fn mx_neg_6(self) -> Self

Sets the horizontal margin of the element. Docs

24px (1.5rem)

Source

pub fn mx_7(self) -> Self

Sets the horizontal margin of the element. Docs

28px (1.75rem)

Source

pub fn mx_neg_7(self) -> Self

Sets the horizontal margin of the element. Docs

28px (1.75rem)

Source

pub fn mx_8(self) -> Self

Sets the horizontal margin of the element. Docs

32px (2rem)

Source

pub fn mx_neg_8(self) -> Self

Sets the horizontal margin of the element. Docs

32px (2rem)

Source

pub fn mx_9(self) -> Self

Sets the horizontal margin of the element. Docs

36px (2.25rem)

Source

pub fn mx_neg_9(self) -> Self

Sets the horizontal margin of the element. Docs

36px (2.25rem)

Source

pub fn mx_10(self) -> Self

Sets the horizontal margin of the element. Docs

40px (2.5rem)

Source

pub fn mx_neg_10(self) -> Self

Sets the horizontal margin of the element. Docs

40px (2.5rem)

Source

pub fn mx_11(self) -> Self

Sets the horizontal margin of the element. Docs

44px (2.75rem)

Source

pub fn mx_neg_11(self) -> Self

Sets the horizontal margin of the element. Docs

44px (2.75rem)

Source

pub fn mx_12(self) -> Self

Sets the horizontal margin of the element. Docs

48px (3rem)

Source

pub fn mx_neg_12(self) -> Self

Sets the horizontal margin of the element. Docs

48px (3rem)

Source

pub fn mx_16(self) -> Self

Sets the horizontal margin of the element. Docs

64px (4rem)

Source

pub fn mx_neg_16(self) -> Self

Sets the horizontal margin of the element. Docs

64px (4rem)

Source

pub fn mx_20(self) -> Self

Sets the horizontal margin of the element. Docs

80px (5rem)

Source

pub fn mx_neg_20(self) -> Self

Sets the horizontal margin of the element. Docs

80px (5rem)

Source

pub fn mx_24(self) -> Self

Sets the horizontal margin of the element. Docs

96px (6rem)

Source

pub fn mx_neg_24(self) -> Self

Sets the horizontal margin of the element. Docs

96px (6rem)

Source

pub fn mx_32(self) -> Self

Sets the horizontal margin of the element. Docs

128px (8rem)

Source

pub fn mx_neg_32(self) -> Self

Sets the horizontal margin of the element. Docs

128px (8rem)

Source

pub fn mx_40(self) -> Self

Sets the horizontal margin of the element. Docs

160px (10rem)

Source

pub fn mx_neg_40(self) -> Self

Sets the horizontal margin of the element. Docs

160px (10rem)

Source

pub fn mx_48(self) -> Self

Sets the horizontal margin of the element. Docs

192px (12rem)

Source

pub fn mx_neg_48(self) -> Self

Sets the horizontal margin of the element. Docs

192px (12rem)

Source

pub fn mx_56(self) -> Self

Sets the horizontal margin of the element. Docs

224px (14rem)

Source

pub fn mx_neg_56(self) -> Self

Sets the horizontal margin of the element. Docs

224px (14rem)

Source

pub fn mx_64(self) -> Self

Sets the horizontal margin of the element. Docs

256px (16rem)

Source

pub fn mx_neg_64(self) -> Self

Sets the horizontal margin of the element. Docs

256px (16rem)

Source

pub fn mx_72(self) -> Self

Sets the horizontal margin of the element. Docs

288px (18rem)

Source

pub fn mx_neg_72(self) -> Self

Sets the horizontal margin of the element. Docs

288px (18rem)

Source

pub fn mx_80(self) -> Self

Sets the horizontal margin of the element. Docs

320px (20rem)

Source

pub fn mx_neg_80(self) -> Self

Sets the horizontal margin of the element. Docs

320px (20rem)

Source

pub fn mx_96(self) -> Self

Sets the horizontal margin of the element. Docs

384px (24rem)

Source

pub fn mx_neg_96(self) -> Self

Sets the horizontal margin of the element. Docs

384px (24rem)

Source

pub fn mx_112(self) -> Self

Sets the horizontal margin of the element. Docs

448px (28rem)

Source

pub fn mx_neg_112(self) -> Self

Sets the horizontal margin of the element. Docs

448px (28rem)

Source

pub fn mx_128(self) -> Self

Sets the horizontal margin of the element. Docs

512px (32rem)

Source

pub fn mx_neg_128(self) -> Self

Sets the horizontal margin of the element. Docs

512px (32rem)

Source

pub fn mx_auto(self) -> Self

Sets the horizontal margin of the element. Docs

Auto

Source

pub fn mx_px(self) -> Self

Sets the horizontal margin of the element. Docs

1px

Source

pub fn mx_neg_px(self) -> Self

Sets the horizontal margin of the element. Docs

1px

Source

pub fn mx_full(self) -> Self

Sets the horizontal margin of the element. Docs

100%

Source

pub fn mx_neg_full(self) -> Self

Sets the horizontal margin of the element. Docs

100%

Source

pub fn mx_1_2(self) -> Self

Sets the horizontal margin of the element. Docs

50% (1/2)

Source

pub fn mx_neg_1_2(self) -> Self

Sets the horizontal margin of the element. Docs

50% (1/2)

Source

pub fn mx_1_3(self) -> Self

Sets the horizontal margin of the element. Docs

33% (1/3)

Source

pub fn mx_neg_1_3(self) -> Self

Sets the horizontal margin of the element. Docs

33% (1/3)

Source

pub fn mx_2_3(self) -> Self

Sets the horizontal margin of the element. Docs

66% (2/3)

Source

pub fn mx_neg_2_3(self) -> Self

Sets the horizontal margin of the element. Docs

66% (2/3)

Source

pub fn mx_1_4(self) -> Self

Sets the horizontal margin of the element. Docs

25% (1/4)

Source

pub fn mx_neg_1_4(self) -> Self

Sets the horizontal margin of the element. Docs

25% (1/4)

Source

pub fn mx_2_4(self) -> Self

Sets the horizontal margin of the element. Docs

50% (2/4)

Source

pub fn mx_neg_2_4(self) -> Self

Sets the horizontal margin of the element. Docs

50% (2/4)

Source

pub fn mx_3_4(self) -> Self

Sets the horizontal margin of the element. Docs

75% (3/4)

Source

pub fn mx_neg_3_4(self) -> Self

Sets the horizontal margin of the element. Docs

75% (3/4)

Source

pub fn mx_1_5(self) -> Self

Sets the horizontal margin of the element. Docs

20% (1/5)

Source

pub fn mx_neg_1_5(self) -> Self

Sets the horizontal margin of the element. Docs

20% (1/5)

Source

pub fn mx_2_5(self) -> Self

Sets the horizontal margin of the element. Docs

40% (2/5)

Source

pub fn mx_neg_2_5(self) -> Self

Sets the horizontal margin of the element. Docs

40% (2/5)

Source

pub fn mx_3_5(self) -> Self

Sets the horizontal margin of the element. Docs

60% (3/5)

Source

pub fn mx_neg_3_5(self) -> Self

Sets the horizontal margin of the element. Docs

60% (3/5)

Source

pub fn mx_4_5(self) -> Self

Sets the horizontal margin of the element. Docs

80% (4/5)

Source

pub fn mx_neg_4_5(self) -> Self

Sets the horizontal margin of the element. Docs

80% (4/5)

Source

pub fn mx_1_6(self) -> Self

Sets the horizontal margin of the element. Docs

16% (1/6)

Source

pub fn mx_neg_1_6(self) -> Self

Sets the horizontal margin of the element. Docs

16% (1/6)

Source

pub fn mx_5_6(self) -> Self

Sets the horizontal margin of the element. Docs

80% (5/6)

Source

pub fn mx_neg_5_6(self) -> Self

Sets the horizontal margin of the element. Docs

80% (5/6)

Source

pub fn mx_1_12(self) -> Self

Sets the horizontal margin of the element. Docs

8% (1/12)

Source

pub fn mx_neg_1_12(self) -> Self

Sets the horizontal margin of the element. Docs

8% (1/12)

Source

pub fn ml(self, length: impl Clone + Into<Length>) -> Self

Sets the left margin of the element. Docs

Source

pub fn ml_0(self) -> Self

Sets the left margin of the element. Docs

0px

Source

pub fn ml_neg_0(self) -> Self

Sets the left margin of the element. Docs

0px

Source

pub fn ml_0p5(self) -> Self

Sets the left margin of the element. Docs

2px (0.125rem)

Source

pub fn ml_neg_0p5(self) -> Self

Sets the left margin of the element. Docs

2px (0.125rem)

Source

pub fn ml_1(self) -> Self

Sets the left margin of the element. Docs

4px (0.25rem)

Source

pub fn ml_neg_1(self) -> Self

Sets the left margin of the element. Docs

4px (0.25rem)

Source

pub fn ml_1p5(self) -> Self

Sets the left margin of the element. Docs

6px (0.375rem)

Source

pub fn ml_neg_1p5(self) -> Self

Sets the left margin of the element. Docs

6px (0.375rem)

Source

pub fn ml_2(self) -> Self

Sets the left margin of the element. Docs

8px (0.5rem)

Source

pub fn ml_neg_2(self) -> Self

Sets the left margin of the element. Docs

8px (0.5rem)

Source

pub fn ml_2p5(self) -> Self

Sets the left margin of the element. Docs

10px (0.625rem)

Source

pub fn ml_neg_2p5(self) -> Self

Sets the left margin of the element. Docs

10px (0.625rem)

Source

pub fn ml_3(self) -> Self

Sets the left margin of the element. Docs

12px (0.75rem)

Source

pub fn ml_neg_3(self) -> Self

Sets the left margin of the element. Docs

12px (0.75rem)

Source

pub fn ml_3p5(self) -> Self

Sets the left margin of the element. Docs

14px (0.875rem)

Source

pub fn ml_neg_3p5(self) -> Self

Sets the left margin of the element. Docs

14px (0.875rem)

Source

pub fn ml_4(self) -> Self

Sets the left margin of the element. Docs

16px (1rem)

Source

pub fn ml_neg_4(self) -> Self

Sets the left margin of the element. Docs

16px (1rem)

Source

pub fn ml_5(self) -> Self

Sets the left margin of the element. Docs

20px (1.25rem)

Source

pub fn ml_neg_5(self) -> Self

Sets the left margin of the element. Docs

20px (1.25rem)

Source

pub fn ml_6(self) -> Self

Sets the left margin of the element. Docs

24px (1.5rem)

Source

pub fn ml_neg_6(self) -> Self

Sets the left margin of the element. Docs

24px (1.5rem)

Source

pub fn ml_7(self) -> Self

Sets the left margin of the element. Docs

28px (1.75rem)

Source

pub fn ml_neg_7(self) -> Self

Sets the left margin of the element. Docs

28px (1.75rem)

Source

pub fn ml_8(self) -> Self

Sets the left margin of the element. Docs

32px (2rem)

Source

pub fn ml_neg_8(self) -> Self

Sets the left margin of the element. Docs

32px (2rem)

Source

pub fn ml_9(self) -> Self

Sets the left margin of the element. Docs

36px (2.25rem)

Source

pub fn ml_neg_9(self) -> Self

Sets the left margin of the element. Docs

36px (2.25rem)

Source

pub fn ml_10(self) -> Self

Sets the left margin of the element. Docs

40px (2.5rem)

Source

pub fn ml_neg_10(self) -> Self

Sets the left margin of the element. Docs

40px (2.5rem)

Source

pub fn ml_11(self) -> Self

Sets the left margin of the element. Docs

44px (2.75rem)

Source

pub fn ml_neg_11(self) -> Self

Sets the left margin of the element. Docs

44px (2.75rem)

Source

pub fn ml_12(self) -> Self

Sets the left margin of the element. Docs

48px (3rem)

Source

pub fn ml_neg_12(self) -> Self

Sets the left margin of the element. Docs

48px (3rem)

Source

pub fn ml_16(self) -> Self

Sets the left margin of the element. Docs

64px (4rem)

Source

pub fn ml_neg_16(self) -> Self

Sets the left margin of the element. Docs

64px (4rem)

Source

pub fn ml_20(self) -> Self

Sets the left margin of the element. Docs

80px (5rem)

Source

pub fn ml_neg_20(self) -> Self

Sets the left margin of the element. Docs

80px (5rem)

Source

pub fn ml_24(self) -> Self

Sets the left margin of the element. Docs

96px (6rem)

Source

pub fn ml_neg_24(self) -> Self

Sets the left margin of the element. Docs

96px (6rem)

Source

pub fn ml_32(self) -> Self

Sets the left margin of the element. Docs

128px (8rem)

Source

pub fn ml_neg_32(self) -> Self

Sets the left margin of the element. Docs

128px (8rem)

Source

pub fn ml_40(self) -> Self

Sets the left margin of the element. Docs

160px (10rem)

Source

pub fn ml_neg_40(self) -> Self

Sets the left margin of the element. Docs

160px (10rem)

Source

pub fn ml_48(self) -> Self

Sets the left margin of the element. Docs

192px (12rem)

Source

pub fn ml_neg_48(self) -> Self

Sets the left margin of the element. Docs

192px (12rem)

Source

pub fn ml_56(self) -> Self

Sets the left margin of the element. Docs

224px (14rem)

Source

pub fn ml_neg_56(self) -> Self

Sets the left margin of the element. Docs

224px (14rem)

Source

pub fn ml_64(self) -> Self

Sets the left margin of the element. Docs

256px (16rem)

Source

pub fn ml_neg_64(self) -> Self

Sets the left margin of the element. Docs

256px (16rem)

Source

pub fn ml_72(self) -> Self

Sets the left margin of the element. Docs

288px (18rem)

Source

pub fn ml_neg_72(self) -> Self

Sets the left margin of the element. Docs

288px (18rem)

Source

pub fn ml_80(self) -> Self

Sets the left margin of the element. Docs

320px (20rem)

Source

pub fn ml_neg_80(self) -> Self

Sets the left margin of the element. Docs

320px (20rem)

Source

pub fn ml_96(self) -> Self

Sets the left margin of the element. Docs

384px (24rem)

Source

pub fn ml_neg_96(self) -> Self

Sets the left margin of the element. Docs

384px (24rem)

Source

pub fn ml_112(self) -> Self

Sets the left margin of the element. Docs

448px (28rem)

Source

pub fn ml_neg_112(self) -> Self

Sets the left margin of the element. Docs

448px (28rem)

Source

pub fn ml_128(self) -> Self

Sets the left margin of the element. Docs

512px (32rem)

Source

pub fn ml_neg_128(self) -> Self

Sets the left margin of the element. Docs

512px (32rem)

Source

pub fn ml_auto(self) -> Self

Sets the left margin of the element. Docs

Auto

Source

pub fn ml_px(self) -> Self

Sets the left margin of the element. Docs

1px

Source

pub fn ml_neg_px(self) -> Self

Sets the left margin of the element. Docs

1px

Source

pub fn ml_full(self) -> Self

Sets the left margin of the element. Docs

100%

Source

pub fn ml_neg_full(self) -> Self

Sets the left margin of the element. Docs

100%

Source

pub fn ml_1_2(self) -> Self

Sets the left margin of the element. Docs

50% (1/2)

Source

pub fn ml_neg_1_2(self) -> Self

Sets the left margin of the element. Docs

50% (1/2)

Source

pub fn ml_1_3(self) -> Self

Sets the left margin of the element. Docs

33% (1/3)

Source

pub fn ml_neg_1_3(self) -> Self

Sets the left margin of the element. Docs

33% (1/3)

Source

pub fn ml_2_3(self) -> Self

Sets the left margin of the element. Docs

66% (2/3)

Source

pub fn ml_neg_2_3(self) -> Self

Sets the left margin of the element. Docs

66% (2/3)

Source

pub fn ml_1_4(self) -> Self

Sets the left margin of the element. Docs

25% (1/4)

Source

pub fn ml_neg_1_4(self) -> Self

Sets the left margin of the element. Docs

25% (1/4)

Source

pub fn ml_2_4(self) -> Self

Sets the left margin of the element. Docs

50% (2/4)

Source

pub fn ml_neg_2_4(self) -> Self

Sets the left margin of the element. Docs

50% (2/4)

Source

pub fn ml_3_4(self) -> Self

Sets the left margin of the element. Docs

75% (3/4)

Source

pub fn ml_neg_3_4(self) -> Self

Sets the left margin of the element. Docs

75% (3/4)

Source

pub fn ml_1_5(self) -> Self

Sets the left margin of the element. Docs

20% (1/5)

Source

pub fn ml_neg_1_5(self) -> Self

Sets the left margin of the element. Docs

20% (1/5)

Source

pub fn ml_2_5(self) -> Self

Sets the left margin of the element. Docs

40% (2/5)

Source

pub fn ml_neg_2_5(self) -> Self

Sets the left margin of the element. Docs

40% (2/5)

Source

pub fn ml_3_5(self) -> Self

Sets the left margin of the element. Docs

60% (3/5)

Source

pub fn ml_neg_3_5(self) -> Self

Sets the left margin of the element. Docs

60% (3/5)

Source

pub fn ml_4_5(self) -> Self

Sets the left margin of the element. Docs

80% (4/5)

Source

pub fn ml_neg_4_5(self) -> Self

Sets the left margin of the element. Docs

80% (4/5)

Source

pub fn ml_1_6(self) -> Self

Sets the left margin of the element. Docs

16% (1/6)

Source

pub fn ml_neg_1_6(self) -> Self

Sets the left margin of the element. Docs

16% (1/6)

Source

pub fn ml_5_6(self) -> Self

Sets the left margin of the element. Docs

80% (5/6)

Source

pub fn ml_neg_5_6(self) -> Self

Sets the left margin of the element. Docs

80% (5/6)

Source

pub fn ml_1_12(self) -> Self

Sets the left margin of the element. Docs

8% (1/12)

Source

pub fn ml_neg_1_12(self) -> Self

Sets the left margin of the element. Docs

8% (1/12)

Source

pub fn mr(self, length: impl Clone + Into<Length>) -> Self

Sets the right margin of the element. Docs

Source

pub fn mr_0(self) -> Self

Sets the right margin of the element. Docs

0px

Source

pub fn mr_neg_0(self) -> Self

Sets the right margin of the element. Docs

0px

Source

pub fn mr_0p5(self) -> Self

Sets the right margin of the element. Docs

2px (0.125rem)

Source

pub fn mr_neg_0p5(self) -> Self

Sets the right margin of the element. Docs

2px (0.125rem)

Source

pub fn mr_1(self) -> Self

Sets the right margin of the element. Docs

4px (0.25rem)

Source

pub fn mr_neg_1(self) -> Self

Sets the right margin of the element. Docs

4px (0.25rem)

Source

pub fn mr_1p5(self) -> Self

Sets the right margin of the element. Docs

6px (0.375rem)

Source

pub fn mr_neg_1p5(self) -> Self

Sets the right margin of the element. Docs

6px (0.375rem)

Source

pub fn mr_2(self) -> Self

Sets the right margin of the element. Docs

8px (0.5rem)

Source

pub fn mr_neg_2(self) -> Self

Sets the right margin of the element. Docs

8px (0.5rem)

Source

pub fn mr_2p5(self) -> Self

Sets the right margin of the element. Docs

10px (0.625rem)

Source

pub fn mr_neg_2p5(self) -> Self

Sets the right margin of the element. Docs

10px (0.625rem)

Source

pub fn mr_3(self) -> Self

Sets the right margin of the element. Docs

12px (0.75rem)

Source

pub fn mr_neg_3(self) -> Self

Sets the right margin of the element. Docs

12px (0.75rem)

Source

pub fn mr_3p5(self) -> Self

Sets the right margin of the element. Docs

14px (0.875rem)

Source

pub fn mr_neg_3p5(self) -> Self

Sets the right margin of the element. Docs

14px (0.875rem)

Source

pub fn mr_4(self) -> Self

Sets the right margin of the element. Docs

16px (1rem)

Source

pub fn mr_neg_4(self) -> Self

Sets the right margin of the element. Docs

16px (1rem)

Source

pub fn mr_5(self) -> Self

Sets the right margin of the element. Docs

20px (1.25rem)

Source

pub fn mr_neg_5(self) -> Self

Sets the right margin of the element. Docs

20px (1.25rem)

Source

pub fn mr_6(self) -> Self

Sets the right margin of the element. Docs

24px (1.5rem)

Source

pub fn mr_neg_6(self) -> Self

Sets the right margin of the element. Docs

24px (1.5rem)

Source

pub fn mr_7(self) -> Self

Sets the right margin of the element. Docs

28px (1.75rem)

Source

pub fn mr_neg_7(self) -> Self

Sets the right margin of the element. Docs

28px (1.75rem)

Source

pub fn mr_8(self) -> Self

Sets the right margin of the element. Docs

32px (2rem)

Source

pub fn mr_neg_8(self) -> Self

Sets the right margin of the element. Docs

32px (2rem)

Source

pub fn mr_9(self) -> Self

Sets the right margin of the element. Docs

36px (2.25rem)

Source

pub fn mr_neg_9(self) -> Self

Sets the right margin of the element. Docs

36px (2.25rem)

Source

pub fn mr_10(self) -> Self

Sets the right margin of the element. Docs

40px (2.5rem)

Source

pub fn mr_neg_10(self) -> Self

Sets the right margin of the element. Docs

40px (2.5rem)

Source

pub fn mr_11(self) -> Self

Sets the right margin of the element. Docs

44px (2.75rem)

Source

pub fn mr_neg_11(self) -> Self

Sets the right margin of the element. Docs

44px (2.75rem)

Source

pub fn mr_12(self) -> Self

Sets the right margin of the element. Docs

48px (3rem)

Source

pub fn mr_neg_12(self) -> Self

Sets the right margin of the element. Docs

48px (3rem)

Source

pub fn mr_16(self) -> Self

Sets the right margin of the element. Docs

64px (4rem)

Source

pub fn mr_neg_16(self) -> Self

Sets the right margin of the element. Docs

64px (4rem)

Source

pub fn mr_20(self) -> Self

Sets the right margin of the element. Docs

80px (5rem)

Source

pub fn mr_neg_20(self) -> Self

Sets the right margin of the element. Docs

80px (5rem)

Source

pub fn mr_24(self) -> Self

Sets the right margin of the element. Docs

96px (6rem)

Source

pub fn mr_neg_24(self) -> Self

Sets the right margin of the element. Docs

96px (6rem)

Source

pub fn mr_32(self) -> Self

Sets the right margin of the element. Docs

128px (8rem)

Source

pub fn mr_neg_32(self) -> Self

Sets the right margin of the element. Docs

128px (8rem)

Source

pub fn mr_40(self) -> Self

Sets the right margin of the element. Docs

160px (10rem)

Source

pub fn mr_neg_40(self) -> Self

Sets the right margin of the element. Docs

160px (10rem)

Source

pub fn mr_48(self) -> Self

Sets the right margin of the element. Docs

192px (12rem)

Source

pub fn mr_neg_48(self) -> Self

Sets the right margin of the element. Docs

192px (12rem)

Source

pub fn mr_56(self) -> Self

Sets the right margin of the element. Docs

224px (14rem)

Source

pub fn mr_neg_56(self) -> Self

Sets the right margin of the element. Docs

224px (14rem)

Source

pub fn mr_64(self) -> Self

Sets the right margin of the element. Docs

256px (16rem)

Source

pub fn mr_neg_64(self) -> Self

Sets the right margin of the element. Docs

256px (16rem)

Source

pub fn mr_72(self) -> Self

Sets the right margin of the element. Docs

288px (18rem)

Source

pub fn mr_neg_72(self) -> Self

Sets the right margin of the element. Docs

288px (18rem)

Source

pub fn mr_80(self) -> Self

Sets the right margin of the element. Docs

320px (20rem)

Source

pub fn mr_neg_80(self) -> Self

Sets the right margin of the element. Docs

320px (20rem)

Source

pub fn mr_96(self) -> Self

Sets the right margin of the element. Docs

384px (24rem)

Source

pub fn mr_neg_96(self) -> Self

Sets the right margin of the element. Docs

384px (24rem)

Source

pub fn mr_112(self) -> Self

Sets the right margin of the element. Docs

448px (28rem)

Source

pub fn mr_neg_112(self) -> Self

Sets the right margin of the element. Docs

448px (28rem)

Source

pub fn mr_128(self) -> Self

Sets the right margin of the element. Docs

512px (32rem)

Source

pub fn mr_neg_128(self) -> Self

Sets the right margin of the element. Docs

512px (32rem)

Source

pub fn mr_auto(self) -> Self

Sets the right margin of the element. Docs

Auto

Source

pub fn mr_px(self) -> Self

Sets the right margin of the element. Docs

1px

Source

pub fn mr_neg_px(self) -> Self

Sets the right margin of the element. Docs

1px

Source

pub fn mr_full(self) -> Self

Sets the right margin of the element. Docs

100%

Source

pub fn mr_neg_full(self) -> Self

Sets the right margin of the element. Docs

100%

Source

pub fn mr_1_2(self) -> Self

Sets the right margin of the element. Docs

50% (1/2)

Source

pub fn mr_neg_1_2(self) -> Self

Sets the right margin of the element. Docs

50% (1/2)

Source

pub fn mr_1_3(self) -> Self

Sets the right margin of the element. Docs

33% (1/3)

Source

pub fn mr_neg_1_3(self) -> Self

Sets the right margin of the element. Docs

33% (1/3)

Source

pub fn mr_2_3(self) -> Self

Sets the right margin of the element. Docs

66% (2/3)

Source

pub fn mr_neg_2_3(self) -> Self

Sets the right margin of the element. Docs

66% (2/3)

Source

pub fn mr_1_4(self) -> Self

Sets the right margin of the element. Docs

25% (1/4)

Source

pub fn mr_neg_1_4(self) -> Self

Sets the right margin of the element. Docs

25% (1/4)

Source

pub fn mr_2_4(self) -> Self

Sets the right margin of the element. Docs

50% (2/4)

Source

pub fn mr_neg_2_4(self) -> Self

Sets the right margin of the element. Docs

50% (2/4)

Source

pub fn mr_3_4(self) -> Self

Sets the right margin of the element. Docs

75% (3/4)

Source

pub fn mr_neg_3_4(self) -> Self

Sets the right margin of the element. Docs

75% (3/4)

Source

pub fn mr_1_5(self) -> Self

Sets the right margin of the element. Docs

20% (1/5)

Source

pub fn mr_neg_1_5(self) -> Self

Sets the right margin of the element. Docs

20% (1/5)

Source

pub fn mr_2_5(self) -> Self

Sets the right margin of the element. Docs

40% (2/5)

Source

pub fn mr_neg_2_5(self) -> Self

Sets the right margin of the element. Docs

40% (2/5)

Source

pub fn mr_3_5(self) -> Self

Sets the right margin of the element. Docs

60% (3/5)

Source

pub fn mr_neg_3_5(self) -> Self

Sets the right margin of the element. Docs

60% (3/5)

Source

pub fn mr_4_5(self) -> Self

Sets the right margin of the element. Docs

80% (4/5)

Source

pub fn mr_neg_4_5(self) -> Self

Sets the right margin of the element. Docs

80% (4/5)

Source

pub fn mr_1_6(self) -> Self

Sets the right margin of the element. Docs

16% (1/6)

Source

pub fn mr_neg_1_6(self) -> Self

Sets the right margin of the element. Docs

16% (1/6)

Source

pub fn mr_5_6(self) -> Self

Sets the right margin of the element. Docs

80% (5/6)

Source

pub fn mr_neg_5_6(self) -> Self

Sets the right margin of the element. Docs

80% (5/6)

Source

pub fn mr_1_12(self) -> Self

Sets the right margin of the element. Docs

8% (1/12)

Source

pub fn mr_neg_1_12(self) -> Self

Sets the right margin of the element. Docs

8% (1/12)

Source

pub fn flex_1(self) -> Self

Source

pub fn flex_none(self) -> Self

Source

pub fn flex_grow(self) -> Self

Source

pub fn flex_shrink(self) -> Self

Source

pub fn flex_shrink_0(self) -> Self

Trait Implementations§

Source§

impl Component for Label

Source§

fn scope() -> ComponentScope

Returns the scope of the component. Read more
Source§

fn description() -> Option<&'static str>

An optional description of the component. Read more
Source§

fn preview(_window: &mut Window, cx: &mut App) -> Option<AnyElement>

The component’s preview. Read more
Source§

fn id() -> ComponentId

The component’s unique identifier. Read more
Source§

fn status() -> ComponentStatus

The ready status of this component. Read more
Source§

fn name() -> &'static str

The name of the component. Read more
Source§

fn sort_name() -> &'static str

Returns a name that the component should be sorted by. Read more
Source§

impl IntoElement for Label

Source§

type Element = Component<Label>

The specific type of element into which the implementing type is converted. Useful for converting other types into elements automatically, like Strings
Source§

fn into_element(self) -> Self::Element

Convert self into a type that implements Element.
Source§

fn into_any_element(self) -> AnyElement

Convert self into a dynamically-typed AnyElement.
Source§

impl LabelCommon for Label

Source§

fn size(self, size: LabelSize) -> Self

Sets the size of the label using a LabelSize.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!").size(LabelSize::Small);
Source§

fn weight(self, weight: FontWeight) -> Self

Sets the weight of the label using a [FontWeight].

§Examples
use gpui::FontWeight;
use ui::prelude::*;

let my_label = Label::new("Hello, World!").weight(FontWeight::BOLD);
Source§

fn line_height_style(self, line_height_style: LineHeightStyle) -> Self

Sets the line height style of the label using a LineHeightStyle.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!").line_height_style(LineHeightStyle::UiLabel);
Source§

fn color(self, color: Color) -> Self

Sets the color of the label using a Color.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!").color(Color::Accent);
Source§

fn strikethrough(self) -> Self

Sets the strikethrough property of the label.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!").strikethrough();
Source§

fn italic(self) -> Self

Sets the italic property of the label.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!").italic();
Source§

fn alpha(self, alpha: f32) -> Self

Sets the alpha property of the color of label.

§Examples
use ui::prelude::*;

let my_label = Label::new("Hello, World!").alpha(0.5);
Source§

fn truncate(self) -> Self

Truncates overflowing text with an ellipsis () if needed.

Source§

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

Styles the label to look like inline code.

Source§

fn underline(self) -> Self

Sets the underline property of the label
Source§

fn single_line(self) -> Self

Sets the label to render as a single line.
Source§

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

Sets the font to the buffer’s
Source§

impl RenderOnce for Label

Source§

fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement

Render this component into an element tree. Note that this method takes ownership of self, as compared to Render::render() method which takes a mutable reference.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Label

§

impl !Send for Label

§

impl !Sync for Label

§

impl !UnwindSafe for Label

§

impl Freeze for Label

§

impl Unpin for Label

§

impl UnsafeUnpin for Label

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
Source§

impl<E> AnimationExt for E
where E: IntoElement + 'static,

Source§

fn with_animation( self, id: impl Into<ElementId>, animation: Animation, animator: impl Fn(Self, f32) -> Self + 'static, ) -> AnimationElement<Self>
where Self: Sized,

Render this component or element with an animation
Source§

fn with_animations( self, id: impl Into<ElementId>, animations: Vec<Animation>, animator: impl Fn(Self, usize, f32) -> Self + 'static, ) -> AnimationElement<Self>
where Self: Sized,

Render this component or element with a chain of animations
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CommonAnimationExt for T
where T: AnimationExt,

Source§

fn with_rotate_animation(self, duration: u64) -> AnimationElement<Self>
where Self: Transformable + Sized,

Render this component as rotating over the given duration. Read more
Source§

fn with_keyed_rotate_animation( self, id: impl Into<ElementId>, duration: u64, ) -> AnimationElement<Self>
where Self: Transformable + Sized,

Render this component as rotating with the given element ID over the given duration.
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T> FluentBuilder for T
where T: IntoElement,

Source§

fn map<U>(self, f: impl FnOnce(Self) -> U) -> U
where Self: Sized,

Imperatively modify self with the given closure.
Source§

fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
where Self: Sized,

Conditionally modify self with the given closure.
Source§

fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
where Self: Sized,

Conditionally modify self with the given closure.
Source§

fn when_some<T>( self, option: Option<T>, then: impl FnOnce(Self, T) -> Self, ) -> Self
where Self: Sized,

Conditionally unwrap and modify self with the given closure, if the given option is Some.
Source§

fn when_none<T>( self, option: &Option<T>, then: impl FnOnce(Self) -> Self, ) -> Self
where Self: Sized,

Conditionally unwrap and modify self with the given closure, if the given option is None.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more