Enum nu_protocol::CommandAction
source · [−]pub enum CommandAction {
Show 13 variants
ChangePath(String),
Exit(i32),
Error(ShellError),
EnterShell(String),
AutoConvert(Value, String),
EnterValueShell(Value),
AddPlugins(String),
UnloadConfig(ConfigPath),
LoadConfig(ConfigPath),
PreviousShell,
NextShell,
GotoShell(usize),
LeaveShell(i32),
}
Expand description
The inner set of actions for the command processor. Each denotes a way to change state in the processor without changing it directly from the command itself.
Variants
ChangePath(String)
Change to a new directory or path (in non-filesystem situations)
Exit(i32)
Exit out of Nu
Error(ShellError)
Display an error
EnterShell(String)
Enter a new shell at the given path
AutoConvert(Value, String)
Convert the value given from one type to another
EnterValueShell(Value)
Enter a value shell, one that allows exploring inside of a Value
AddPlugins(String)
Add plugins from path given
UnloadConfig(ConfigPath)
Unload the config specified by PathBuf if present
LoadConfig(ConfigPath)
Load the config specified by PathBuf
PreviousShell
Go to the previous shell in the shell ring buffer
NextShell
Go to the next shell in the shell ring buffer
GotoShell(usize)
Jump to the specified shell in the shell ring buffer
LeaveShell(i32)
Leave the current shell. If it’s the last shell, exit out of Nu
Trait Implementations
sourceimpl Clone for CommandAction
impl Clone for CommandAction
sourcefn clone(&self) -> CommandAction
fn clone(&self) -> CommandAction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CommandAction
impl Debug for CommandAction
sourceimpl<'de> Deserialize<'de> for CommandAction
impl<'de> Deserialize<'de> for CommandAction
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<CommandAction> for CommandAction
impl PartialEq<CommandAction> for CommandAction
sourcefn eq(&self, other: &CommandAction) -> bool
fn eq(&self, other: &CommandAction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CommandAction) -> bool
fn ne(&self, other: &CommandAction) -> bool
This method tests for !=
.
sourceimpl PrettyDebug for CommandAction
impl PrettyDebug for CommandAction
sourcefn pretty(&self) -> DebugDocBuilder
fn pretty(&self) -> DebugDocBuilder
Get a command action ready to be pretty-printed
fn to_doc(&self) -> DebugDoc
fn pretty_doc(
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
fn pretty_builder(&self) -> DocBuilder<'static, BoxAllocator, ShellAnnotation>
sourcefn display(&self) -> String
fn display(&self) -> String
A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
fn plain_string(&self, width: usize) -> String
fn colored_string(&self, width: usize) -> String
sourceimpl Serialize for CommandAction
impl Serialize for CommandAction
impl StructuralPartialEq for CommandAction
Auto Trait Implementations
impl RefUnwindSafe for CommandAction
impl Send for CommandAction
impl Sync for CommandAction
impl Unpin for CommandAction
impl UnwindSafe for CommandAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> PrettyDebugWithSource for T where
T: PrettyDebug,
impl<T> PrettyDebugWithSource for T where
T: PrettyDebug,
pub fn pretty_debug(&self, _source: &str) -> DebugDocBuilder
fn refined_pretty_debug(
&self,
_refine: PrettyDebugRefineKind,
source: &str
) -> DebugDocBuilder
fn debug(&self, source: impl Into<Text>) -> String where
Self: Clone,
fn debuggable(self, source: impl Into<Text>) -> DebuggableWithSource<Self>
sourceimpl<T> SpannedItem for T
impl<T> SpannedItem for T
sourceimpl<T> TaggedItem for T
impl<T> TaggedItem for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more