pub enum AbsoluteFontWeight {
Weight(Number),
Normal,
Bold,
}
Expand description
An absolute font-weight value for a @font-face rule.
https://drafts.csswg.org/css-fonts-4/#font-weight-absolute-values
Variants§
Weight(Number)
A <number>
, with the additional constraints specified in:
https://drafts.csswg.org/css-fonts-4/#font-weight-numeric-values
Normal
Normal font weight. Same as 400.
Bold
Bold font weight. Same as 700.
Implementations§
source§impl AbsoluteFontWeight
impl AbsoluteFontWeight
sourcepub fn compute(&self) -> FontWeight
pub fn compute(&self) -> FontWeight
Returns the computed value for this absolute font weight.
Trait Implementations§
source§impl Clone for AbsoluteFontWeight
impl Clone for AbsoluteFontWeight
source§fn clone(&self) -> AbsoluteFontWeight
fn clone(&self) -> AbsoluteFontWeight
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 AbsoluteFontWeight
impl Debug for AbsoluteFontWeight
source§impl MallocSizeOf for AbsoluteFontWeight
impl MallocSizeOf for AbsoluteFontWeight
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl Parse for AbsoluteFontWeight
impl Parse for AbsoluteFontWeight
source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
source§impl PartialEq for AbsoluteFontWeight
impl PartialEq for AbsoluteFontWeight
source§fn eq(&self, other: &AbsoluteFontWeight) -> bool
fn eq(&self, other: &AbsoluteFontWeight) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SpecifiedValueInfo for AbsoluteFontWeight
impl SpecifiedValueInfo for AbsoluteFontWeight
source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Supported CssTypes by the given value type. Read more
source§impl ToCss for AbsoluteFontWeight
impl ToCss for AbsoluteFontWeight
source§impl ToShmem for AbsoluteFontWeight
impl ToShmem for AbsoluteFontWeight
impl Copy for AbsoluteFontWeight
impl StructuralPartialEq for AbsoluteFontWeight
Auto Trait Implementations§
impl Freeze for AbsoluteFontWeight
impl RefUnwindSafe for AbsoluteFontWeight
impl Send for AbsoluteFontWeight
impl Sync for AbsoluteFontWeight
impl Unpin for AbsoluteFontWeight
impl UnwindSafe for AbsoluteFontWeight
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