pub struct TextFrame { /* private fields */ }Expand description
The abstract representation of a TextFrame.
Examples
let mut text_frame = TextFrame::new()
.frame_var(&FrameVar::Space)
.algn(Algn::Centr)
.color_fra(Color::Red)
.color_txt(Color::Cyan)
.color_fill(Color::Magenta)
.expand(2)
.width(10)
.expand_width(2)
.expand_height(2)
.left_top('┏')
.top_line('╍')
.right_top('┓')
.vert_left('┋')
.vert_right('┋')
.left_btm('┗')
.btm_line('╍')
.right_btm('┛')
.fill('░');Implementations§
source§impl TextFrame
impl TextFrame
sourcepub fn frame_iter<'a>(&'a self, text: &'a str) -> impl Iterator<Item = &str>
pub fn frame_iter<'a>(&'a self, text: &'a str) -> impl Iterator<Item = &str>
Create an iterator frame.
sourcepub fn vert_right(self, ch: char) -> Self
pub fn vert_right(self, ch: char) -> Self
Value for right vertical line.
sourcepub fn expand_width(self, width: usize) -> Self
pub fn expand_width(self, width: usize) -> Self
Value for frame width expand.
sourcepub fn expand_height(self, height: usize) -> Self
pub fn expand_height(self, height: usize) -> Self
Value for frame height expand.
sourcepub fn color_fill(self, color: Color) -> Self
pub fn color_fill(self, color: Color) -> Self
Specifies the fill color.
Trait Implementations§
source§impl PartialEq<TextFrame> for TextFrame
impl PartialEq<TextFrame> for TextFrame
impl Eq for TextFrame
impl StructuralEq for TextFrame
impl StructuralPartialEq for TextFrame
Auto Trait Implementations§
impl RefUnwindSafe for TextFrame
impl Send for TextFrame
impl Sync for TextFrame
impl Unpin for TextFrame
impl UnwindSafe for TextFrame
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