pub struct StdinBuffer { /* private fields */ }Expand description
Stdin buffer for handling batch input and bracketed paste.
Implementations§
Source§impl StdinBuffer
impl StdinBuffer
Sourcepub fn with_options(options: StdinBufferOptions) -> Self
pub fn with_options(options: StdinBufferOptions) -> Self
Create a new stdin buffer with options.
Sourcepub fn on_event(&self, callback: Arc<dyn Fn(&StdinBufferEvent) + Send + Sync>)
pub fn on_event(&self, callback: Arc<dyn Fn(&StdinBufferEvent) + Send + Sync>)
Add a callback for events.
Sourcepub fn is_in_paste(&self) -> bool
pub fn is_in_paste(&self) -> bool
Check if we’re in paste mode.
Sourcepub fn pop_event(&self) -> Option<StdinBufferEvent>
pub fn pop_event(&self) -> Option<StdinBufferEvent>
Get pending events.
Sourcepub fn clear_events(&self)
pub fn clear_events(&self)
Clear all pending events.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StdinBuffer
impl RefUnwindSafe for StdinBuffer
impl Send for StdinBuffer
impl Sync for StdinBuffer
impl Unpin for StdinBuffer
impl UnsafeUnpin for StdinBuffer
impl UnwindSafe for StdinBuffer
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