pub enum FontWeight {
_100,
_200,
_300,
_400,
_500,
_600,
_700,
_800,
_900,
}Expand description
A font-weight value for a @font-face rule. The font-weight CSS property specifies the weight or boldness of the font.
Variants§
Implementations§
Source§impl FontWeight
impl FontWeight
pub const normal: FontWeight = FontWeight::_400
pub const bold: FontWeight = FontWeight::_700
Sourcepub fn from_int(weight: i32) -> Result<Self, ()>
pub fn from_int(weight: i32) -> Result<Self, ()>
Convert from an integer to Weight As of CSS Fonts Module Level 3, only the following values are valid: 100, 200, 300, 400, 500, 600, 700, 800 and 900
pub fn isExactlyNormal(&self) -> bool
pub fn isExactlyBold(&self) -> bool
pub fn isBold(&self) -> bool
Trait Implementations§
Source§impl Clone for FontWeight
impl Clone for FontWeight
Source§fn clone(&self) -> FontWeight
fn clone(&self) -> FontWeight
Returns a duplicate 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 FontWeight
impl Debug for FontWeight
Source§impl Hash for FontWeight
impl Hash for FontWeight
Source§impl Ord for FontWeight
impl Ord for FontWeight
Source§fn cmp(&self, other: &FontWeight) -> Ordering
fn cmp(&self, other: &FontWeight) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FontWeight
impl PartialEq for FontWeight
Source§impl PartialOrd for FontWeight
impl PartialOrd for FontWeight
Source§impl ToCss for FontWeight
impl ToCss for FontWeight
impl Copy for FontWeight
impl Eq for FontWeight
impl StructuralPartialEq for FontWeight
Auto Trait Implementations§
impl Freeze for FontWeight
impl RefUnwindSafe for FontWeight
impl Send for FontWeight
impl Sync for FontWeight
impl Unpin for FontWeight
impl UnwindSafe for FontWeight
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