Struct style::font_face::FontFaceRuleData
[−]
[src]
pub struct FontFaceRuleData { pub family: Option<FamilyName>, pub sources: Option<Vec<Source>>, pub source_location: SourceLocation, }
Data inside a @font-face
rule.
Fields
family: Option<FamilyName>
The name of this font face
sources: Option<Vec<Source>>
The alternative sources for this font face.
source_location: SourceLocation
Line and column of the @font-face rule source code.
Methods
impl FontFaceRuleData
[src]
pub fn font_face(&self) -> Option<FontFace>
[src]
Per https://github.com/w3c/csswg-drafts/issues/1133 an @font-face rule is valid as far as the CSS parser is concerned even if it doesn’t have a font-family or src declaration.
However both are required for the rule to represent an actual font face.
impl FontFaceRule
[src]
pub fn clone_conditionally_gecko_or_servo(&self) -> FontFaceRule
[src]
Trait Implementations
impl Clone for FontFaceRuleData
[src]
fn clone(&self) -> FontFaceRuleData
[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 Debug for FontFaceRuleData
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Eq for FontFaceRuleData
[src]
impl PartialEq for FontFaceRuleData
[src]
fn eq(&self, __arg_0: &FontFaceRuleData) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &FontFaceRuleData) -> bool
[src]
This method tests for !=
.
impl ToCssWithGuard for FontFaceRuleData
[src]
fn to_css<W>(&self, _guard: &SharedRwLockReadGuard, dest: &mut W) -> Result where
W: Write,
[src]
W: Write,
Serialize self
in CSS syntax, writing to dest
, using the given lock guard.
fn to_css_string(&self, guard: &SharedRwLockReadGuard) -> String
[src]
Serialize self
in CSS syntax using the given lock guard and return a string. Read more