Struct savory_elements::view::text::Text[][src]

pub struct Text {
    pub id: Option<Id>,
    pub design_system: DesignSystem,
    pub direction: Option<Direction>,
    pub text: Cow<'static, str>,
    pub disabled: bool,
    pub size: Option<Size>,
    pub style: Option<FontStyle>,
    pub small_caps: bool,
    pub weight: Option<Weight>,
    pub color: Option<Color>,
    pub letter_spacing: Option<Length>,
    pub word_spacing: Option<Length>,
    pub lines_spacing: Option<LineHeight>,
    pub align: Option<TextAlign>,
    pub justify_by: Option<TextJustify>,
    pub indent: Option<TextIndent>,
    pub wrap: bool,
    pub shadow: Option<TextShadow>,
}

Text view

see the module docs

Fields

id: Option<Id>design_system: DesignSystemdirection: Option<Direction>text: Cow<'static, str>disabled: boolsize: Option<Size>style: Option<FontStyle>small_caps: boolweight: Option<Weight>color: Option<Color>letter_spacing: Option<Length>word_spacing: Option<Length>lines_spacing: Option<LineHeight>align: Option<TextAlign>justify_by: Option<TextJustify>indent: Option<TextIndent>wrap: boolshadow: Option<TextShadow>

Implementations

impl Text[src]

pub fn id(self, value: impl Into<Id>) -> Self[src]

pub fn design_system(self, value: impl Into<DesignSystem>) -> Self[src]

pub fn direction(self, value: impl Into<Direction>) -> Self[src]

pub fn try_direction(self, value: Option<impl Into<Direction>>) -> Self[src]

pub fn rtl(self) -> Self[src]

pub fn ltr(self) -> Self[src]

pub fn auto_dir(self) -> Self[src]

pub fn text(self, value: impl Into<Cow<'static, str>>) -> Self[src]

pub fn disabled(self, value: impl Into<bool>) -> Self[src]

pub fn is_disabled(&self) -> bool[src]

pub fn size(self, value: impl Into<Size>) -> Self[src]

pub fn try_size(self, value: Option<impl Into<Size>>) -> Self[src]

pub fn xx_small(self) -> Self[src]

pub fn x_small(self) -> Self[src]

pub fn small(self) -> Self[src]

pub fn large(self) -> Self[src]

pub fn x_large(self) -> Self[src]

pub fn xx_large(self) -> Self[src]

pub fn smaller(self) -> Self[src]

pub fn larger(self) -> Self[src]

pub fn style(self, value: impl Into<FontStyle>) -> Self[src]

pub fn try_style(self, value: Option<impl Into<FontStyle>>) -> Self[src]

pub fn italic(self) -> Self[src]

pub fn oblique(self) -> Self[src]

pub fn small_caps(self, value: impl Into<bool>) -> Self[src]

pub fn weight(self, value: impl Into<Weight>) -> Self[src]

pub fn try_weight(self, value: Option<impl Into<Weight>>) -> Self[src]

pub fn thin_weight(self) -> Self[src]

pub fn extra_light_weight(self) -> Self[src]

pub fn light_weight(self) -> Self[src]

pub fn normal_weight(self) -> Self[src]

pub fn medium_weight(self) -> Self[src]

pub fn semi_bold_weight(self) -> Self[src]

pub fn bold_weight(self) -> Self[src]

pub fn bold(self) -> Self[src]

pub fn ultra_bold_weight(self) -> Self[src]

pub fn heavy_weight(self) -> Self[src]

pub fn color(self, value: impl Into<Color>) -> Self[src]

pub fn try_color(self, value: Option<impl Into<Color>>) -> Self[src]

pub fn letter_spacing(self, value: impl Into<Length>) -> Self[src]

pub fn try_letter_spacing(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn word_spacing(self, value: impl Into<Length>) -> Self[src]

pub fn try_word_spacing(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn lines_spacing(self, value: impl Into<LineHeight>) -> Self[src]

pub fn try_lines_spacing(self, value: Option<impl Into<LineHeight>>) -> Self[src]

pub fn align(self, value: impl Into<TextAlign>) -> Self[src]

pub fn try_align(self, value: Option<impl Into<TextAlign>>) -> Self[src]

pub fn start(self) -> Self[src]

pub fn end(self) -> Self[src]

pub fn left(self) -> Self[src]

pub fn right(self) -> Self[src]

pub fn center(self) -> Self[src]

pub fn justify(self) -> Self[src]

pub fn justify_by(self, value: impl Into<TextJustify>) -> Self[src]

pub fn try_justify_by(self, value: Option<impl Into<TextJustify>>) -> Self[src]

pub fn justify_by_word(self) -> Self[src]

pub fn justify_by_character(self) -> Self[src]

pub fn indent(self, value: impl Into<TextIndent>) -> Self[src]

pub fn try_indent(self, value: Option<impl Into<TextIndent>>) -> Self[src]

pub fn wrap(self, value: impl Into<bool>) -> Self[src]

pub fn shadow(self, value: impl Into<TextShadow>) -> Self[src]

pub fn try_shadow(self, value: Option<impl Into<TextShadow>>) -> Self[src]

pub fn and_shadow(
    self,
    set_value: impl FnOnce(TextShadow) -> TextShadow
) -> Self where
    TextShadow: Default
[src]

impl Text[src]

pub fn config() -> Config[src]

impl Text[src]

pub fn new(text: impl Into<Cow<'static, str>>, ds: DesignSystem) -> Self[src]

Trait Implementations

impl Clone for Text[src]

impl<Msg> View<Node<Msg>> for Text[src]

Auto Trait Implementations

impl !RefUnwindSafe for Text

impl !Send for Text

impl !Sync for Text

impl Unpin for Text

impl !UnwindSafe for Text

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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