pub struct TextBackground {
pub color: Rgba,
pub padding: TextInsets,
pub radius: f32,
pub border: Option<TextBoxBorder>,
pub extent: TextBoxExtent,
}Expand description
A box behind each line of text, as CSS draws an inline box’s background with
box-decoration-break: clone: each line’s box has its own padding, radius and border.
Fields§
§color: RgbaBox color.
padding: TextInsetsSpace between the text and the box edge, as fractions of the font size, each side in
[0, 2].
radius: f32Every corner’s radius, as a fraction of the font size, in [0, 2]; each box’s radius is
capped at half its shorter side, as CSS border-radius. Default 0.
border: Option<TextBoxBorder>A line inside the box’s edge, as a CSS border. None draws none.
extent: TextBoxExtentWhich part of each line the box spans.
Implementations§
Trait Implementations§
Source§impl Clone for TextBackground
impl Clone for TextBackground
Source§impl Debug for TextBackground
impl Debug for TextBackground
Source§impl<'de> Deserialize<'de> for TextBackground
impl<'de> Deserialize<'de> for TextBackground
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextBackground
impl PartialEq for TextBackground
Source§impl Serialize for TextBackground
impl Serialize for TextBackground
impl StructuralPartialEq for TextBackground
Auto Trait Implementations§
impl Forget for TextBackground
impl Freeze for TextBackground
impl Move for TextBackground
impl RefUnwindSafe for TextBackground
impl Send for TextBackgroundwhere
RawVecInner: Send,
impl Sync for TextBackgroundwhere
RawVecInner: Sync,
impl Unpin for TextBackground
impl UnsafeUnpin for TextBackground
impl UnwindSafe for TextBackgroundwhere
RawVecInner: UnwindSafe,
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