pub struct PasteMsg(pub String);Expand description
A message indicating that text was pasted into the terminal (bracketed paste).
This message is generated when bracketed paste mode is enabled and the user pastes text into the terminal. The pasted content is captured as a single string, preserving newlines and special characters.
§Examples
use bubbletea_rs::event::PasteMsg;
// Handling a paste event in your model's update method
let paste_msg = PasteMsg("Hello\nWorld".to_string());
// The text contains the exact pasted content
assert_eq!(paste_msg.0, "Hello\nWorld");§Note
Bracketed paste mode must be enabled with EnableBracketedPasteMsg for
these messages to be generated.
Tuple Fields§
§0: StringTrait Implementations§
Auto Trait Implementations§
impl Freeze for PasteMsg
impl RefUnwindSafe for PasteMsg
impl Send for PasteMsg
impl Sync for PasteMsg
impl Unpin for PasteMsg
impl UnwindSafe for PasteMsg
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