pub struct TextAttributes { /* private fields */ }Implementations§
Source§impl TextAttributes
impl TextAttributes
pub fn font(&self) -> Option<&FontDescriptor>
pub const fn font_size(&self) -> Pt
pub const fn letter_spacing(&self) -> Pt
pub fn language(&self) -> Option<&str>
pub const fn direction(&self) -> Option<TextDirection>
pub fn decorations(&self) -> &[TextDecoration]
pub fn with_font(self, font: FontDescriptor) -> Self
pub fn with_font_size(self, font_size: Pt) -> Result<Self>
pub fn with_letter_spacing(self, letter_spacing: Pt) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_direction(self, direction: TextDirection) -> Self
pub fn with_decoration(self, decoration: TextDecoration) -> Self
Trait Implementations§
Source§impl Clone for TextAttributes
impl Clone for TextAttributes
Source§fn clone(&self) -> TextAttributes
fn clone(&self) -> TextAttributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TextAttributes
impl Debug for TextAttributes
Source§impl Default for TextAttributes
impl Default for TextAttributes
Source§impl From<&TextSpan> for TextAttributes
impl From<&TextSpan> for TextAttributes
Source§impl PartialEq for TextAttributes
impl PartialEq for TextAttributes
Source§fn eq(&self, other: &TextAttributes) -> bool
fn eq(&self, other: &TextAttributes) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextAttributes
Auto Trait Implementations§
impl Freeze for TextAttributes
impl RefUnwindSafe for TextAttributes
impl Send for TextAttributes
impl Sync for TextAttributes
impl Unpin for TextAttributes
impl UnsafeUnpin for TextAttributes
impl UnwindSafe for TextAttributes
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