#[non_exhaustive]pub enum TextAlign {
Left,
Right,
Center,
Justify,
Start,
End,
}Expand description
Text alignment options for text rendering.
Corresponds to CSS text-align property values.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Left
Aligns inline content to the left edge of the line box
Right
Aligns inline content to the right edge of the line box
Center
Centers inline content within the line box
Justify
Expands inline content to fill the entire line box
Start
Aligns inline content to the start edge of the line box (language-dependent)
End
Aligns inline content to the end edge of the line box (language-dependent)
Trait Implementations§
impl Copy for TextAlign
Source§impl<'i> FromCss<'i> for TextAlign
impl<'i> FromCss<'i> for TextAlign
Source§const VALID_TOKENS: &'static [CssToken]
const VALID_TOKENS: &'static [CssToken]
Returns the list of valid CSS tokens for this type.
Source§fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
Parses the type from a
Parser instance.Source§fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
Helper function to parse the type from a string.
Source§const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
Message template used when building parse errors for this type.
impl StructuralPartialEq for TextAlign
Source§impl TailwindPropertyParser for TextAlign
impl TailwindPropertyParser for TextAlign
Auto Trait Implementations§
impl Freeze for TextAlign
impl RefUnwindSafe for TextAlign
impl Send for TextAlign
impl Sync for TextAlign
impl Unpin for TextAlign
impl UnsafeUnpin for TextAlign
impl UnwindSafe for TextAlign
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