pub enum PositionComponent {
KeywordX(PositionKeywordX),
KeywordY(PositionKeywordY),
Length(Length),
}Expand description
A single background-position component for an axis.
Variants§
KeywordX(PositionKeywordX)
A horizontal keyword.
KeywordY(PositionKeywordY)
A vertical keyword.
Length(Length)
An absolute length value.
Trait Implementations§
Source§impl Clone for PositionComponent
impl Clone for PositionComponent
Source§fn clone(&self) -> PositionComponent
fn clone(&self) -> PositionComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PositionComponent
Source§impl Debug for PositionComponent
impl Debug for PositionComponent
Source§impl From<Length> for PositionComponent
impl From<Length> for PositionComponent
Source§impl From<PositionComponent> for Length
impl From<PositionComponent> for Length
Source§fn from(component: PositionComponent) -> Self
fn from(component: PositionComponent) -> Self
Converts to this type from the input type.
Source§impl<'i> FromCss<'i> for PositionComponent
impl<'i> FromCss<'i> for PositionComponent
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.
Source§impl PartialEq for PositionComponent
impl PartialEq for PositionComponent
Source§fn eq(&self, other: &PositionComponent) -> bool
fn eq(&self, other: &PositionComponent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PositionComponent
Auto Trait Implementations§
impl Freeze for PositionComponent
impl RefUnwindSafe for PositionComponent
impl Send for PositionComponent
impl Sync for PositionComponent
impl Unpin for PositionComponent
impl UnsafeUnpin for PositionComponent
impl UnwindSafe for PositionComponent
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