[][src]Struct bitbar::Command

pub struct Command { /* fields omitted */ }

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.

Methods

impl Command[src]

pub fn terminal(args: impl Into<Params>) -> Command[src]

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

pub fn try_from<P: TryInto<Params>>(args: P) -> Result<Command, P::Error>[src]

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.

pub fn try_terminal<P: TryInto<Params>>(args: P) -> Result<Command, P::Error>[src]

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

Trait Implementations

impl Debug for Command[src]

impl<P: Into<Params>> From<P> for Command[src]

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

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

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> From<T> for T[src]

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

impl<T> SetParameter for T

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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