pub struct FontPaletteValuesRule {
pub name: DashedIdent,
pub family_names: Vec<FamilyName>,
pub base_palette: Option<FontPaletteBase>,
pub override_colors: Vec<FontPaletteOverrideColor>,
pub source_location: SourceLocation,
}
Expand description
The @font-palette-values
at-rule.
Fields§
§name: DashedIdent
Palette name.
family_names: Vec<FamilyName>
Font family list for @font-palette-values rule. Family names cannot contain generic families. FamilyName also accepts only non-generic names.
base_palette: Option<FontPaletteBase>
The base palette.
override_colors: Vec<FontPaletteOverrideColor>
The list of override colors.
source_location: SourceLocation
The line and column of the rule’s source code.
Implementations§
source§impl FontPaletteValuesRule
impl FontPaletteValuesRule
sourcefn new(name: DashedIdent, location: SourceLocation) -> Self
fn new(name: DashedIdent, location: SourceLocation) -> Self
Creates an empty FontPaletteValuesRule with given location and name.
sourcepub fn parse(
context: &ParserContext<'_>,
input: &mut Parser<'_, '_>,
name: DashedIdent,
location: SourceLocation,
) -> Self
pub fn parse( context: &ParserContext<'_>, input: &mut Parser<'_, '_>, name: DashedIdent, location: SourceLocation, ) -> Self
Parses a FontPaletteValuesRule
.
sourcefn value_to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
fn value_to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
Prints inside of @font-palette-values
block.
Trait Implementations§
source§impl Clone for FontPaletteValuesRule
impl Clone for FontPaletteValuesRule
source§fn clone(&self) -> FontPaletteValuesRule
fn clone(&self) -> FontPaletteValuesRule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FontPaletteValuesRule
impl Debug for FontPaletteValuesRule
source§impl PartialEq for FontPaletteValuesRule
impl PartialEq for FontPaletteValuesRule
source§fn eq(&self, other: &FontPaletteValuesRule) -> bool
fn eq(&self, other: &FontPaletteValuesRule) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToCssWithGuard for FontPaletteValuesRule
impl ToCssWithGuard for FontPaletteValuesRule
source§fn to_css(
&self,
_guard: &SharedRwLockReadGuard<'_>,
dest: &mut CssStringWriter,
) -> Result
fn to_css( &self, _guard: &SharedRwLockReadGuard<'_>, dest: &mut CssStringWriter, ) -> Result
Serialize
self
in CSS syntax, writing to dest
, using the given lock guard.source§fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString
fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString
Serialize
self
in CSS syntax using the given lock guard and return a string. Read moresource§impl ToShmem for FontPaletteValuesRule
impl ToShmem for FontPaletteValuesRule
impl StructuralPartialEq for FontPaletteValuesRule
Auto Trait Implementations§
impl Freeze for FontPaletteValuesRule
impl RefUnwindSafe for FontPaletteValuesRule
impl Send for FontPaletteValuesRule
impl Sync for FontPaletteValuesRule
impl Unpin for FontPaletteValuesRule
impl UnwindSafe for FontPaletteValuesRule
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert