pub struct LineStyle {
pub compound_style: CompoundStyle,
pub align: Alignment,
}
Expand description
A style applicable to a type of line.
It’s made of
- the base style of the compounds
- the alignment
Fields§
§compound_style: CompoundStyle
§align: Alignment
Implementations§
source§impl LineStyle
impl LineStyle
sourcepub fn repeat_string(
&self,
f: &mut Formatter<'_>,
s: &str,
count: usize
) -> Result
pub fn repeat_string( &self, f: &mut Formatter<'_>, s: &str, count: usize ) -> Result
Write a string several times with the line compound style
sourcepub fn repeat_space(&self, f: &mut Formatter<'_>, count: usize) -> Result
pub fn repeat_space(&self, f: &mut Formatter<'_>, count: usize) -> Result
Write 0 or more spaces with the line’s compound style
pub fn blend_with<C: Into<Color>>(&mut self, color: C, weight: f32)
Trait Implementations§
source§impl<'de> Deserialize<'de> for LineStyle
impl<'de> Deserialize<'de> for LineStyle
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 From<&[StyleToken]> for LineStyle
impl From<&[StyleToken]> for LineStyle
source§fn from(tokens: &[StyleToken]) -> Self
fn from(tokens: &[StyleToken]) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for LineStyle
impl Send for LineStyle
impl Sync for LineStyle
impl Unpin for LineStyle
impl UnwindSafe for LineStyle
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