pub struct PrintfMsg(pub String);Expand description
A message to print formatted text to the terminal.
Similar to PrintMsg, but the text is treated as pre-formatted and
printed exactly as provided without adding a newline.
§Examples
use bubbletea_rs::event::PrintfMsg;
// Print formatted text without automatic newline
let msg = PrintfMsg("Progress: 50%\r".to_string());§Note
This bypasses the normal view rendering and directly outputs to the terminal. Useful for progress indicators or custom formatting that requires precise control over newlines and carriage returns.
Tuple Fields§
§0: StringTrait Implementations§
Auto Trait Implementations§
impl Freeze for PrintfMsg
impl RefUnwindSafe for PrintfMsg
impl Send for PrintfMsg
impl Sync for PrintfMsg
impl Unpin for PrintfMsg
impl UnwindSafe for PrintfMsg
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