Struct cosmic_text::Attrs
source · pub struct Attrs<'a> {
pub color_opt: Option<Color>,
pub family: Family<'a>,
pub monospaced: bool,
pub stretch: Stretch,
pub style: Style,
pub weight: Weight,
}
Expand description
Text attributes
Fields
color_opt: Option<Color>
family: Family<'a>
monospaced: bool
stretch: Stretch
style: Style
weight: Weight
Implementations
sourceimpl<'a> Attrs<'a>
impl<'a> Attrs<'a>
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new set of attributes with sane defaults
This defaults to a regular Sans-Serif font.
sourcepub fn monospaced(self, monospaced: bool) -> Self
pub fn monospaced(self, monospaced: bool) -> Self
Set monospaced
sourcepub fn compatible(&self, other: &Self) -> bool
pub fn compatible(&self, other: &Self) -> bool
Check if this set of attributes can be shaped with another
Trait Implementations
impl<'a> Copy for Attrs<'a>
impl<'a> Eq for Attrs<'a>
impl<'a> StructuralEq for Attrs<'a>
impl<'a> StructuralPartialEq for Attrs<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Attrs<'a>
impl<'a> Send for Attrs<'a>
impl<'a> Sync for Attrs<'a>
impl<'a> Unpin for Attrs<'a>
impl<'a> UnwindSafe for Attrs<'a>
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