Struct gpui2::FontWeight
source · pub struct FontWeight(pub f32);
Expand description
The degree of blackness or stroke thickness of a font. This value ranges from 100.0 to 900.0, with 400.0 as normal.
Tuple Fields§
§0: f32
Implementations§
source§impl FontWeight
impl FontWeight
sourcepub const THIN: FontWeight = _
pub const THIN: FontWeight = _
Thin weight (100), the thinnest value.
sourcepub const EXTRA_LIGHT: FontWeight = _
pub const EXTRA_LIGHT: FontWeight = _
Extra light weight (200).
sourcepub const LIGHT: FontWeight = _
pub const LIGHT: FontWeight = _
Light weight (300).
sourcepub const NORMAL: FontWeight = _
pub const NORMAL: FontWeight = _
Normal (400).
sourcepub const MEDIUM: FontWeight = _
pub const MEDIUM: FontWeight = _
Medium weight (500, higher than normal).
sourcepub const SEMIBOLD: FontWeight = _
pub const SEMIBOLD: FontWeight = _
Semibold weight (600).
sourcepub const BOLD: FontWeight = _
pub const BOLD: FontWeight = _
Bold weight (700).
sourcepub const EXTRA_BOLD: FontWeight = _
pub const EXTRA_BOLD: FontWeight = _
Extra-bold weight (800).
sourcepub const BLACK: FontWeight = _
pub const BLACK: FontWeight = _
Black weight (900), the thickest value.
Trait Implementations§
source§impl Clone for FontWeight
impl Clone for FontWeight
source§fn clone(&self) -> FontWeight
fn clone(&self) -> FontWeight
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 FontWeight
impl Debug for FontWeight
source§impl Default for FontWeight
impl Default for FontWeight
source§fn default() -> FontWeight
fn default() -> FontWeight
Returns the “default value” for a type. Read more
source§impl From<FontWeight> for Weight
impl From<FontWeight> for Weight
source§fn from(value: FontWeight) -> Self
fn from(value: FontWeight) -> Self
Converts to this type from the input type.
source§impl Hash for FontWeight
impl Hash for FontWeight
source§impl PartialEq<FontWeight> for FontWeight
impl PartialEq<FontWeight> for FontWeight
source§fn eq(&self, other: &FontWeight) -> bool
fn eq(&self, other: &FontWeight) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<FontWeight> for FontWeight
impl PartialOrd<FontWeight> for FontWeight
source§fn partial_cmp(&self, other: &FontWeight) -> Option<Ordering>
fn partial_cmp(&self, other: &FontWeight) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for FontWeight
impl Eq for FontWeight
impl StructuralPartialEq for FontWeight
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.