Struct bitbar::Command[][src]

pub struct Command { /* fields omitted */ }
Expand description

Used by ContentItem::command.

A Command contains the Params, which includes the actual command (called bash= by BitBar) and its parameters, and the value of terminal=.

It is usually constructed via conversion, unless terminal=true is required.

Note: Unlike BitBar’s default of true, Command assumes a default of terminal=false.

Implementations

Creates a Command with the terminal= value set to true.

Attempts to construct a Command with terminal= set to false from the given arguments.

This is not a TryFrom implementation due to a limitation in Rust.

Same as Command::terminal but for types that might not convert to Params.

Trait Implementations

Formats the value using the given formatter. Read more

Converts an array containing a command string and 0–5 parameters to a command argument vector. The terminal= value will be false.

Performs the conversion.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Sets value as a parameter of self.

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.