pub struct PipeSelections<U>(/* private fields */);Expand description
Pipes the selections of a File through an external command
This can be useful if you, for example, don’t have access to a
formatter, but want to format text, so you pass it to
PipeSelections with fold as the command, or things of the
sort.
Implementations§
Source§impl<U: Ui> PipeSelections<U>
impl<U: Ui> PipeSelections<U>
Sourcepub fn new() -> Prompt<U, Self>
pub fn new() -> Prompt<U, Self>
Returns a Prompt with PipeSelections as its
PromptMode
Trait Implementations§
Source§impl<U: Clone> Clone for PipeSelections<U>
impl<U: Clone> Clone for PipeSelections<U>
Source§fn clone(&self) -> PipeSelections<U>
fn clone(&self) -> PipeSelections<U>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<U: Ui> PromptMode<U> for PipeSelections<U>
impl<U: Ui> PromptMode<U> for PipeSelections<U>
Source§fn before_exit(&mut self, pa: &mut Pass, text: Text, _: &<U as Ui>::Area)
fn before_exit(&mut self, pa: &mut Pass, text: Text, _: &<U as Ui>::Area)
What to do before exiting the
PromptMode Read moreSource§type ExitWidget = File<U>
type ExitWidget = File<U>
What
Widget to exit to, upon pressing enter, esc, or
backspace in an empty PromptLineSource§fn on_switch(&mut self, pa: &mut Pass, text: Text, area: &U::Area) -> Text
fn on_switch(&mut self, pa: &mut Pass, text: Text, area: &U::Area) -> Text
What to do when switchin onto this
PromptMode Read moreSource§fn once()
fn once()
Things to do when this
PromptMode is first instantiatedSource§fn return_handle(&self) -> Option<Handle<Self::ExitWidget, U>>
fn return_handle(&self) -> Option<Handle<Self::ExitWidget, U>>
An optional returning
Handle for the ExitWidgetimpl<U: Copy> Copy for PipeSelections<U>
Auto Trait Implementations§
impl<U> Freeze for PipeSelections<U>
impl<U> RefUnwindSafe for PipeSelections<U>where
U: RefUnwindSafe,
impl<U> Send for PipeSelections<U>where
U: Send,
impl<U> Sync for PipeSelections<U>where
U: Sync,
impl<U> Unpin for PipeSelections<U>where
U: Unpin,
impl<U> UnwindSafe for PipeSelections<U>where
U: UnwindSafe,
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