Enum nu_protocol::ReturnSuccess[][src]

pub enum ReturnSuccess {
    Value(Value),
    DebugValue(Value),
    Action(CommandAction),
}

The fundamental success type in the pipeline. Commands return these values as their main responsibility

Variants

Value(Value)

A value to be used or shown to the user

DebugValue(Value)

A debug-enabled value to be used or shown to the user

An action to be performed as values pass out of the command. These are performed rather than passed to the next command in the pipeline

Implementations

impl ReturnSuccess[src]

pub fn raw_value(&self) -> Option<Value>[src]

Get to the contained Value, if possible

pub fn change_cwd(path: String) -> ReturnValue[src]

Helper function for an action to change the the path

pub fn value(input: impl Into<Value>) -> ReturnValue[src]

Helper function to create simple values for returning

pub fn debug_value(input: impl Into<Value>) -> ReturnValue[src]

Helper function to create simple debug-enabled values for returning

pub fn action(input: CommandAction) -> ReturnValue[src]

Helper function for creating actions

Trait Implementations

impl Clone for ReturnSuccess[src]

impl Debug for ReturnSuccess[src]

impl<'de> Deserialize<'de> for ReturnSuccess[src]

impl PrettyDebug for ReturnSuccess[src]

fn pretty(&self) -> DebugDocBuilder[src]

Get a return success ready to be pretty-printed

impl Serialize for ReturnSuccess[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> PrettyDebugWithSource for T where
    T: PrettyDebug
[src]

impl<T> SpannedItem for T[src]

impl<T> TaggedItem for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.