[−][src]Struct bitbar::Command
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,