Struct font_kit::properties::Properties
source · [−]Expand description
Properties that specify which font in a family to use: e.g. style, weight, and stretchiness.
This object supports a method chaining style for idiomatic initialization; e.g.
println!("{:?}", Properties::new().style(Style::Italic));Fields
style: StyleThe font style, as defined in CSS.
weight: WeightThe font weight, as defined in CSS.
stretch: StretchThe font stretchiness, as defined in CSS.
Implementations
sourceimpl Properties
impl Properties
sourcepub fn new() -> Properties
pub fn new() -> Properties
Initializes a property set to its default values: normal style, normal weight, and normal stretchiness.
sourcepub fn style(&mut self, style: Style) -> &mut Properties
pub fn style(&mut self, style: Style) -> &mut Properties
Sets the value of the style property and returns this property set for method chaining.
sourcepub fn weight(&mut self, weight: Weight) -> &mut Properties
pub fn weight(&mut self, weight: Weight) -> &mut Properties
Sets the value of the weight property and returns this property set for method chaining.
sourcepub fn stretch(&mut self, stretch: Stretch) -> &mut Properties
pub fn stretch(&mut self, stretch: Stretch) -> &mut Properties
Sets the value of the stretch property and returns this property set for method chaining.
Trait Implementations
sourceimpl Clone for Properties
impl Clone for Properties
sourcefn clone(&self) -> Properties
fn clone(&self) -> Properties
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 more
sourceimpl Debug for Properties
impl Debug for Properties
sourceimpl Default for Properties
impl Default for Properties
sourcefn default() -> Properties
fn default() -> Properties
Returns the “default value” for a type. Read more
sourceimpl PartialEq<Properties> for Properties
impl PartialEq<Properties> for Properties
sourcefn eq(&self, other: &Properties) -> bool
fn eq(&self, other: &Properties) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Properties) -> bool
fn ne(&self, other: &Properties) -> bool
This method tests for !=.
impl Copy for Properties
impl StructuralPartialEq for Properties
Auto Trait Implementations
impl RefUnwindSafe for Properties
impl Send for Properties
impl Sync for Properties
impl Unpin for Properties
impl UnwindSafe for Properties
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more