pub struct FontStretch(pub f32);
Expand description
The width of a font as an approximate fraction of the normal width.
Widths range from 0.5 to 2.0 inclusive, with 1.0 as the normal width.
Tuple Fields§
§0: f32
Implementations§
source§impl FontStretch
impl FontStretch
sourcepub const ULTRA_CONDENSED: FontStretch = _
pub const ULTRA_CONDENSED: FontStretch = _
Ultra-condensed width (50%), the narrowest possible.
sourcepub const EXTRA_CONDENSED: FontStretch = _
pub const EXTRA_CONDENSED: FontStretch = _
Extra-condensed width (62.5%).
sourcepub const CONDENSED: FontStretch = _
pub const CONDENSED: FontStretch = _
Condensed width (75%).
sourcepub const SEMI_CONDENSED: FontStretch = _
pub const SEMI_CONDENSED: FontStretch = _
Semi-condensed width (87.5%).
sourcepub const NORMAL: FontStretch = _
pub const NORMAL: FontStretch = _
Normal width (100%).
sourcepub const SEMI_EXPANDED: FontStretch = _
pub const SEMI_EXPANDED: FontStretch = _
Semi-expanded width (112.5%).
sourcepub const EXPANDED: FontStretch = _
pub const EXPANDED: FontStretch = _
Expanded width (125%).
sourcepub const EXTRA_EXPANDED: FontStretch = _
pub const EXTRA_EXPANDED: FontStretch = _
Extra-expanded width (150%).
sourcepub const ULTRA_EXPANDED: FontStretch = _
pub const ULTRA_EXPANDED: FontStretch = _
Ultra-expanded width (200%), the widest possible.
Trait Implementations§
source§impl Clone for FontStretch
impl Clone for FontStretch
source§fn clone(&self) -> FontStretch
fn clone(&self) -> FontStretch
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 FontStretch
impl Debug for FontStretch
source§impl Default for FontStretch
impl Default for FontStretch
source§fn default() -> FontStretch
fn default() -> FontStretch
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for FontStretch
impl<'de> Deserialize<'de> for FontStretch
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FontStretch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FontStretch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Factor> for FontStretch
impl From<Factor> for FontStretch
source§fn from(fct: Factor) -> FontStretch
fn from(fct: Factor) -> FontStretch
Converts to this type from the input type.
source§impl From<FactorPercent> for FontStretch
impl From<FactorPercent> for FontStretch
source§fn from(pct: FactorPercent) -> FontStretch
fn from(pct: FactorPercent) -> FontStretch
Converts to this type from the input type.
source§impl From<Width> for FontStretch
impl From<Width> for FontStretch
source§fn from(value: Width) -> FontStretch
fn from(value: Width) -> FontStretch
Converts to this type from the input type.
source§impl From<f32> for FontStretch
impl From<f32> for FontStretch
source§fn from(fct: f32) -> FontStretch
fn from(fct: f32) -> FontStretch
Converts to this type from the input type.
source§impl Hash for FontStretch
impl Hash for FontStretch
source§impl IntoVar<FontStretch> for Factor
impl IntoVar<FontStretch> for Factor
source§fn into_var(self) -> <Factor as IntoVar<FontStretch>>::Var
fn into_var(self) -> <Factor as IntoVar<FontStretch>>::Var
Converts the source value into a var.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<FontStretch> for FactorPercent
impl IntoVar<FontStretch> for FactorPercent
source§fn into_var(self) -> <FactorPercent as IntoVar<FontStretch>>::Var
fn into_var(self) -> <FactorPercent as IntoVar<FontStretch>>::Var
Converts the source value into a var.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<FontStretch> for f32
impl IntoVar<FontStretch> for f32
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl PartialEq for FontStretch
impl PartialEq for FontStretch
source§impl PartialOrd for FontStretch
impl PartialOrd for FontStretch
source§impl Serialize for FontStretch
impl Serialize for FontStretch
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl Transitionable for FontStretch
impl Transitionable for FontStretch
source§fn lerp(self, to: &FontStretch, step: Factor) -> FontStretch
fn lerp(self, to: &FontStretch, step: Factor) -> FontStretch
Sample the linear interpolation from
self
-> to
by step
.impl Copy for FontStretch
impl IntoValue<FontStretch> for Factor
impl IntoValue<FontStretch> for FactorPercent
impl IntoValue<FontStretch> for f32
Auto Trait Implementations§
impl Freeze for FontStretch
impl RefUnwindSafe for FontStretch
impl Send for FontStretch
impl Sync for FontStretch
impl Unpin for FontStretch
impl UnwindSafe for FontStretch
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> 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 more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.