pub struct Decoration {
pub kind: DecorationKind,
pub color: Option<Color>,
pub thickness: f32,
}Expand description
Decoration describes a line drawn relative to styled text.
Fields§
§kind: DecorationKindkind selects the decoration’s position.
color: Option<Color>color overrides the text color when set.
thickness: f32thickness multiplies the font’s suggested decoration thickness.
Implementations§
Source§impl Decoration
impl Decoration
Sourcepub fn new(kind: DecorationKind) -> Decoration
pub fn new(kind: DecorationKind) -> Decoration
new creates a text-colored decoration at the font’s suggested thickness.
Trait Implementations§
Source§impl Clone for Decoration
impl Clone for Decoration
Source§fn clone(&self) -> Decoration
fn clone(&self) -> Decoration
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 moreimpl Copy for Decoration
Source§impl Debug for Decoration
impl Debug for Decoration
Source§impl PartialEq for Decoration
impl PartialEq for Decoration
impl StructuralPartialEq for Decoration
Auto Trait Implementations§
impl Freeze for Decoration
impl RefUnwindSafe for Decoration
impl Send for Decoration
impl Sync for Decoration
impl Unpin for Decoration
impl UnsafeUnpin for Decoration
impl UnwindSafe for Decoration
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