Enum style::properties::PropertyId
[−]
[src]
pub enum PropertyId { Longhand(LonghandId), Shorthand(ShorthandId), LonghandAlias(LonghandId, AliasId), ShorthandAlias(ShorthandId, AliasId), Custom(Name), }
Servo's representation of a CSS property, that is, either a longhand, a shorthand, or a custom property.
Variants
Longhand(LonghandId)
A longhand property.
Shorthand(ShorthandId)
A shorthand property.
LonghandAlias(LonghandId, AliasId)
An alias for a longhand property.
ShorthandAlias(ShorthandId, AliasId)
An alias for a shorthand property.
Custom(Name)
A custom property.
Methods
impl PropertyId
[src]
pub fn longhand_id(&self) -> Option<LonghandId>
[src]
Return the longhand id that this property id represents.
pub fn parse(property_name: &str) -> Result<Self, ()>
[src]
Returns a given property from the string s
.
Returns Err(()) for unknown non-custom properties.
pub fn as_shorthand(&self) -> Result<ShorthandId, PropertyDeclarationId>
[src]
Given this property id, get it either as a shorthand or as a
PropertyDeclarationId
.
pub fn name(&self) -> Cow<'static, str>
[src]
Returns the name of the property without CSS escaping.
Trait Implementations
impl Clone for PropertyId
[src]
fn clone(&self) -> PropertyId
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for PropertyId
[src]
impl PartialEq for PropertyId
[src]
fn eq(&self, __arg_0: &PropertyId) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PropertyId) -> bool
[src]
This method tests for !=
.
impl Debug for PropertyId
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more