Skip to main content

PropertyData

Struct PropertyData 

Source
pub struct PropertyData {
    pub name: &'static str,
    pub syntax: Option<&'static str>,
    pub initial: Option<&'static str>,
    pub inherited: Option<bool>,
    pub longhands: &'static [&'static str],
    pub alias_of: Option<&'static str>,
    pub href: &'static str,
}
Expand description

One property, as its spec defines it.

Fields§

§name: &'static str§syntax: Option<&'static str>

The value grammar, in the value definition syntax; None for the few legacy aliases defined only by what they alias.

§initial: Option<&'static str>

The initial value as the spec writes it, which for a shorthand is prose (“see individual properties”).

§inherited: Option<bool>

None where the spec says something other than yes or no, as a shorthand’s “see individual properties”.

§longhands: &'static [&'static str]

For a shorthand, the longhands it sets; empty for a longhand.

§alias_of: Option<&'static str>

For a legacy alias (-webkit-box-flex and the like), the property it’s another name for.

§href: &'static str

Where the spec defines it.

Implementations§

Source§

impl PropertyData

Source

pub fn is_shorthand(&self) -> bool

Source

pub fn grammar(&self) -> Option<&'static Grammar>

The grammar of its value, parsed: the alias target’s for an alias.

Trait Implementations§

Source§

impl Debug for PropertyData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for PropertyData

Source§

impl PartialEq for PropertyData

Source§

fn eq(&self, other: &PropertyData) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PropertyData

Auto Trait Implementations§

Blanket Implementations§

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> 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.