Struct inksac::types::StyleBuilder
source · pub struct StyleBuilder { /* private fields */ }Expand description
A builder struct for constructing a Style instance with various configurations.
Implementations§
source§impl StyleBuilder
impl StyleBuilder
sourcepub fn foreground(self, color: Color) -> Self
pub fn foreground(self, color: Color) -> Self
sourcepub fn background(self, color: Color) -> Self
pub fn background(self, color: Color) -> Self
sourcepub fn bold(self) -> Self
pub fn bold(self) -> Self
Sets the bold attribute of the style to true.
Example
use inksac::types::StyleBuilder;
let style = StyleBuilder::default()
.bold()
.build();sourcepub fn dim(self) -> Self
pub fn dim(self) -> Self
Sets the dim attribute of the style to true.
Example
use inksac::types::StyleBuilder;
let style = StyleBuilder::default()
.dim()
.build();sourcepub fn italic(self) -> Self
pub fn italic(self) -> Self
Sets the italic attribute of the style to true.
Example
use inksac::types::StyleBuilder;
let style = StyleBuilder::default()
.italic()
.build();Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for StyleBuilder
impl Send for StyleBuilder
impl Sync for StyleBuilder
impl Unpin for StyleBuilder
impl UnwindSafe for StyleBuilder
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