pub struct SimpleStylingBuilder { /* private fields */ }Implementations§
Source§impl SimpleStylingBuilder
impl SimpleStylingBuilder
Sourcepub fn line_height(&mut self, line_height: f32) -> &mut Self
pub fn line_height(&mut self, line_height: f32) -> &mut Self
Set the line height Default: 1.5
Sourcepub fn font_family(&mut self, font_family: Vec<FamilyOwned>) -> &mut Self
pub fn font_family(&mut self, font_family: Vec<FamilyOwned>) -> &mut Self
Set the font families used
Default: [FamilyOwned::SansSerif]
Sourcepub fn weight(&mut self, weight: Weight) -> &mut Self
pub fn weight(&mut self, weight: Weight) -> &mut Self
Set the font weight (such as boldness or thinness)
Default: Weight::NORMAL
Sourcepub fn italic_style(&mut self, italic_style: Style) -> &mut Self
pub fn italic_style(&mut self, italic_style: Style) -> &mut Self
Set the italic style
Default: Style::Normal
Sourcepub fn stretch(&mut self, stretch: Stretch) -> &mut Self
pub fn stretch(&mut self, stretch: Stretch) -> &mut Self
Set the font stretch
Default: Stretch::Normal
Sourcepub fn indent_style(&mut self, indent_style: IndentStyle) -> &mut Self
pub fn indent_style(&mut self, indent_style: IndentStyle) -> &mut Self
Set the indent style
Default: IndentStyle::Spaces(4)
Sourcepub fn atomic_soft_tabs(&mut self, atomic_soft_tabs: bool) -> &mut Self
pub fn atomic_soft_tabs(&mut self, atomic_soft_tabs: bool) -> &mut Self
Set whether the cursor should treat leading soft tabs as if they are hard tabs Default: false
Sourcepub fn wrap(&mut self, wrap: WrapMethod) -> &mut Self
pub fn wrap(&mut self, wrap: WrapMethod) -> &mut Self
Set the wrapping method
Default: WrapMethod::EditorWidth
Sourcepub fn build(&self) -> SimpleStyling
pub fn build(&self) -> SimpleStyling
Build the styling with the given color scheme
Trait Implementations§
Source§impl Clone for SimpleStylingBuilder
impl Clone for SimpleStylingBuilder
Source§fn clone(&self) -> SimpleStylingBuilder
fn clone(&self) -> SimpleStylingBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SimpleStylingBuilder
impl Default for SimpleStylingBuilder
Source§fn default() -> SimpleStylingBuilder
fn default() -> SimpleStylingBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SimpleStylingBuilder
impl RefUnwindSafe for SimpleStylingBuilder
impl Send for SimpleStylingBuilder
impl Sync for SimpleStylingBuilder
impl Unpin for SimpleStylingBuilder
impl UnwindSafe for SimpleStylingBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more