pub enum BoxAlign {
Left,
Center,
Right,
}Expand description
Specifies the alignment of text within the text box or the box itself within the terminal.
This enum is used in two contexts:
- To control the alignment of text segments within the box
- To control the alignment of the entire box within the terminal width
§Examples
use boxy_cli::prelude::*;
let mut my_box = Boxy::new(BoxType::Single, "#00ffff");
// Center the box in the terminal
my_box.set_align(BoxAlign::Center);
// Add a left-aligned text segment
my_box.add_text_sgmt("Left aligned text", "#ffffff", BoxAlign::Left);
// Add a right-aligned text segment
my_box.add_text_sgmt("Right aligned text", "#ffffff", BoxAlign::Right);Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoxAlign
impl RefUnwindSafe for BoxAlign
impl Send for BoxAlign
impl Sync for BoxAlign
impl Unpin for BoxAlign
impl UnwindSafe for BoxAlign
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