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

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

Action(CommandAction)

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

Get to the contained Value, if possible

Helper function for an action to change the the path

Helper function to create simple values for returning

Helper function to create simple debug-enabled values for returning

Helper function for creating actions

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Get a return success ready to be pretty-printed

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts a value into a Spanned value

Converts a value into a Spanned value, using an unknown Span

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.