[]Struct druid::FontWeight

pub struct FontWeight(_);

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

pub const THIN: FontWeight

pub const HAIRLINE: FontWeight

pub const EXTRA_LIGHT: FontWeight

pub const LIGHT: FontWeight

pub const REGULAR: FontWeight

pub const NORMAL: FontWeight

pub const MEDIUM: FontWeight

pub const SEMI_BOLD: FontWeight

pub const BOLD: FontWeight

pub const EXTRA_BOLD: FontWeight

pub const BLACK: FontWeight

pub const HEAVY: FontWeight

pub const EXTRA_BLACK: FontWeight

pub fn new(raw: u16) -> FontWeight

Create a new FontWeight with a custom value.

Values will be clamped to the range 1..=1000.

pub const fn to_raw(self) -> u16

Return the raw value as a u16.

Trait Implementations

impl Clone for FontWeight

impl Copy for FontWeight

impl Data for FontWeight[src]

impl Debug for FontWeight

impl Default for FontWeight

impl Eq for FontWeight

impl From<FontWeight> for TextAttribute

impl Hash for FontWeight

impl PartialEq<FontWeight> for FontWeight

impl StructuralEq for FontWeight

impl StructuralPartialEq for FontWeight

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AnyEq for T where
    T: PartialEq<T> + Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.