Struct frui::prelude::FontWeight
[−]pub struct FontWeight(_);Expand description
A font weight, represented as a value in the range 1..=1000.
This is based on the CSS font-weight property. In general, you should
prefer the constants defined on this type, such as FontWeight::REGULAR or
FontWeight::BOLD.
Implementations
impl FontWeight
impl FontWeight
pub const THIN: FontWeight = FontWeight(100)
pub const HAIRLINE: FontWeight = FontWeight::THIN
pub const EXTRA_LIGHT: FontWeight = FontWeight(200)
pub const LIGHT: FontWeight = FontWeight(300)
pub const REGULAR: FontWeight = FontWeight(400)
pub const NORMAL: FontWeight = FontWeight::REGULAR
pub const MEDIUM: FontWeight = FontWeight(500)
pub const SEMI_BOLD: FontWeight = FontWeight(600)
pub const BOLD: FontWeight = FontWeight(700)
pub const EXTRA_BOLD: FontWeight = FontWeight(800)
pub const BLACK: FontWeight = FontWeight(900)
pub const HEAVY: FontWeight = FontWeight::BLACK
pub const EXTRA_BLACK: FontWeight = FontWeight(950)
pub fn new(raw: u16) -> FontWeight
pub fn new(raw: u16) -> FontWeight
Create a new FontWeight with a custom value.
Values will be clamped to the range 1..=1000.
Trait Implementations
impl Clone for FontWeight
impl Clone for FontWeight
fn clone(&self) -> FontWeight
fn clone(&self) -> FontWeight
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Debug for FontWeight
impl Debug for FontWeight
impl Default for FontWeight
impl Default for FontWeight
fn default() -> FontWeight
fn default() -> FontWeight
Returns the “default value” for a type. Read more
impl From<FontWeight> for TextAttribute
impl From<FontWeight> for TextAttribute
fn from(src: FontWeight) -> TextAttribute
fn from(src: FontWeight) -> TextAttribute
Converts to this type from the input type.
impl Hash for FontWeight
impl Hash for FontWeight
impl PartialEq<FontWeight> for FontWeight
impl PartialEq<FontWeight> for FontWeight
fn eq(&self, other: &FontWeight) -> bool
fn eq(&self, other: &FontWeight) -> bool
impl Copy for FontWeight
impl Eq for FontWeight
impl StructuralEq for FontWeight
impl StructuralPartialEq for FontWeight
Auto Trait Implementations
impl Immutable for FontWeight
impl RefUnwindSafe for FontWeight
impl Send for FontWeight
impl Sync for FontWeight
impl Unpin for FontWeight
impl UnwindSafe for FontWeight
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more